Skip to content

Commit

Permalink
fix: add option to not use cargo cache
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomatsubara committed Oct 17, 2024
1 parent ddf2a56 commit 74d91a2
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions dist/build-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127477,8 +127477,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -127696,7 +127696,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/build-crates-standalone-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127461,8 +127461,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -127709,7 +127709,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/bump-crates-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81183,8 +81183,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -81401,7 +81401,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/publish-crates-cargo-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -81072,8 +81072,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -81511,7 +81511,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/publish-crates-debian-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127456,8 +127456,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -127849,7 +127849,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/publish-crates-eclipse-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127537,8 +127537,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -127955,7 +127955,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/publish-crates-github-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127537,8 +127537,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -127895,7 +127895,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
6 changes: 3 additions & 3 deletions dist/publish-crates-homebrew-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -127441,8 +127441,8 @@ function installBinaryFromGit(name, gitUrl, gitBranch) {
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
async function installBinaryCached(name) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
async function installBinaryCached(name, useCache) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [(0,path__WEBPACK_IMPORTED_MODULE_1__.join)(os__WEBPACK_IMPORTED_MODULE_0__.homedir(), ".cargo", "bin")];
const version = _config__WEBPACK_IMPORTED_MODULE_6__/* .config.lock.cratesio */ .v.lock.cratesio[name];
const key = `${os__WEBPACK_IMPORTED_MODULE_0__.platform()}-${os__WEBPACK_IMPORTED_MODULE_0__.release()}-${os__WEBPACK_IMPORTED_MODULE_0__.arch()}-${name}-${version}`;
Expand Down Expand Up @@ -127885,7 +127885,7 @@ _cargo__WEBPACK_IMPORTED_MODULE_2__ = (__webpack_async_dependencies__.then ? (aw

class TOML {
static async init() {
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2");
await _cargo__WEBPACK_IMPORTED_MODULE_2__/* .installBinaryCached */ .Mj("toml-cli2", false);
return new TOML();
}
get(path, key) {
Expand Down
4 changes: 2 additions & 2 deletions src/cargo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,8 @@ export function installBinaryFromGit(name: string, gitUrl: string, gitBranch: st
* The executable is cached using GitHub's `@actions/cache`.
* @param name Name of the cargo binary on crates.io
*/
export async function installBinaryCached(name: string) {
if (process.env["GITHUB_ACTIONS"] != undefined) {
export async function installBinaryCached(name: string, useCache?: boolean) {
if (process.env["GITHUB_ACTIONS"] != undefined && useCache == true) {
const paths = [join(os.homedir(), ".cargo", "bin")];
const version = config.lock.cratesio[name];
const key = `${os.platform()}-${os.release()}-${os.arch()}-${name}-${version}`;
Expand Down
2 changes: 1 addition & 1 deletion src/toml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as cargo from "./cargo";

export class TOML {
static async init(): Promise<TOML> {
await cargo.installBinaryCached("toml-cli2");
await cargo.installBinaryCached("toml-cli2", false);
return new TOML();
}

Expand Down

0 comments on commit 74d91a2

Please sign in to comment.