From f94c935bbac63ee2f4be08f0b096af68467869fe Mon Sep 17 00:00:00 2001 From: Adam Dierkens Date: Thu, 16 May 2024 12:17:24 -0400 Subject: [PATCH] Update test to include arch --- docs/pages/docs/configuration/non-npm.mdx | 15 +++++---------- packages/cli/__tests__/bundle.test.ts | 4 +++- scripts/auto-update-curl-version.js | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/pages/docs/configuration/non-npm.mdx b/docs/pages/docs/configuration/non-npm.mdx index f9ce98987..176e829fa 100644 --- a/docs/pages/docs/configuration/non-npm.mdx +++ b/docs/pages/docs/configuration/non-npm.mdx @@ -2,8 +2,7 @@ title: Non-npm Usage --- -If you're on some platform other than [npm](https://npmjs.com) it doesn't make sense to download `auto` through [npm](https://npmjs.com). -For these situations we package `auto` for all major operating systems (`linux`, `osx`, `windows`). +If you're on some platform other than [npm](https://npmjs.com) it doesn't make sense to download `auto` through [npm](https://npmjs.com). For these situations we package `auto` for all major operating systems (`linux`, `osx`, `windows`). ## Installation @@ -11,14 +10,12 @@ Simply download the appropriate version for your operating system and make it ex ```bash # Download a platform specific version of auto -curl -vkL -o - https://github.com/intuit/auto/releases/download/v11.1.6/auto-linux.gz | gunzip > ~/auto +curl -vkL -o - https://github.com/intuit/auto/releases/download/v11.1.6/auto-linux-x64.gz | gunzip > ~/auto # Make auto executable chmod a+x ~/auto ``` -This executable contains all of the official `auto` plugins so you do not have to download anything extra. -This version of `auto` uses the [git-tag](../generated/git-tag) plugins as the default instead of [npm](../generated/npm). -If you specify any plugins this will be overridden. +This executable contains all of the official `auto` plugins so you do not have to download anything extra. This version of `auto` uses the [git-tag](../generated/git-tag) plugins as the default instead of [npm](../generated/npm). If you specify any plugins this will be overridden. ### Installation via brew (OSX) @@ -78,8 +75,7 @@ Now that you have `auto` all set up you can use all of it's commands! ## Plugins -As stated above, all of the official plugins (the ones included in this repo/docs) are included in the binary version of `auto`. -However you might want to use an unofficial plugin or even write your own. +As stated above, all of the official plugins (the ones included in this repo/docs) are included in the binary version of `auto`. However you might want to use an unofficial plugin or even write your own. #### Local Plugins @@ -100,8 +96,7 @@ You could: #### Hosted Plugins -If you want to share your custom plugins between projects then you can host them on some SCM (ex: GitHub). -A plugin just needs to consist of an `index.js` that implements your plugin. (or it could be as complex as any NPM package) +If you want to share your custom plugins between projects then you can host them on some SCM (ex: GitHub). A plugin just needs to consist of an `index.js` that implements your plugin. (or it could be as complex as any NPM package) Edit your CI build to download these plugins when building. diff --git a/packages/cli/__tests__/bundle.test.ts b/packages/cli/__tests__/bundle.test.ts index 71f1cea75..77003be38 100644 --- a/packages/cli/__tests__/bundle.test.ts +++ b/packages/cli/__tests__/bundle.test.ts @@ -6,7 +6,9 @@ test("bundle should function", () => { (process.platform === "win32" && "win.exe") || (process.platform === "darwin" && "macos") || "linux"; - const zip = path.join(__dirname, `../binary/auto-${type}`); + + const { arch } = process; + const zip = path.join(__dirname, `../binary/auto-${type}-${arch}`); const binary = path.join(__dirname, "../auto"); execSync(`gunzip -c ${zip} > ${binary}`); diff --git a/scripts/auto-update-curl-version.js b/scripts/auto-update-curl-version.js index 063033c63..d7d851e2d 100644 --- a/scripts/auto-update-curl-version.js +++ b/scripts/auto-update-curl-version.js @@ -28,7 +28,7 @@ module.exports = class TestPlugin { fs.writeFileSync( filename, nonNpmDocs.replace( - /(download\/v)(\d+\.\d+\.\d+)(\/auto-linux\.gz)/, + /(download\/v)(\d+\.\d+\.\d+)(\/auto-linux-x64\.gz)/, `$1${inc(lastRelease, bump)}$3` ) );