Skip to content

Commit

Permalink
Update paths for binaries to include arch
Browse files Browse the repository at this point in the history
  • Loading branch information
adierkens committed May 16, 2024
1 parent 0e5b4c3 commit e082388
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
9 changes: 5 additions & 4 deletions auto.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const allContributorsOptions: IAllContributorsPluginOptions = {
};

const brewOptions: IBrewPluginOptions = {
executable: "./packages/cli/binary/auto-macos.gz",
executable: "./packages/cli/binary/auto-macos-x64.gz",
name: "auto",
};

Expand All @@ -36,9 +36,10 @@ export default function rc(): AutoRc {
[
"upload-assets",
[
"./packages/cli/binary/auto-linux.gz",
"./packages/cli/binary/auto-macos.gz",
"./packages/cli/binary/auto-win.exe.gz",
"./packages/cli/binary/auto-linux-x64.gz",
"./packages/cli/binary/auto-macos-x64.gz",
"./packages/cli/binary/auto-macos-arm64.gz",
"./packages/cli/binary/auto-win-x64.exe.gz",
],
],
["npm", npmOptions],
Expand Down
4 changes: 2 additions & 2 deletions formula-template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ class Auto < Formula

def install
libexec.install Dir["*"]
bin.install libexec/"auto-macos"
mv bin/"auto-macos", bin/"auto"
bin.install libexec/"auto-macos-x64"
mv bin/"auto-macos-x64", bin/"auto"
end

test do
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"docs:build": "yarn docs:generate && ignite build",
"create:plugin": "./scripts/create-plugin.js",
"create:package": "./scripts/create-package.js",
"install-mac": "yarn lerna run bundle --scope=auto && gunzip -c ./packages/cli/binary/auto-macos.gz > /usr/local/bin/auto",
"install-mac": "yarn lerna run bundle --scope=auto && gunzip -c ./packages/cli/binary/auto-macos-x64.gz > /usr/local/bin/auto",
"postinstall": "patch-package"
},
"devDependencies": {
Expand Down
10 changes: 8 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
"email": "lisowski54@gmail.com"
},
"pkg": {
"scripts": "../../plugins/**/dist/**/*.js"
"scripts": "../../plugins/**/dist/**/*.js",
"targets": [
"linux-x64",
"win-x64",
"macos-x64",
"macos-arm64"
]
},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
Expand Down Expand Up @@ -45,7 +51,7 @@
"test": "jest --maxWorkers=2",
"bundle": "yarn inject-version && yarn package && yarn gzip",
"inject-version": "node scripts/inject-version.js",
"package": "rimraf binary && pkg . --out-path binary --targets linux,win,macos-x64,macos-arm64",
"package": "rimraf binary && pkg . --out-path binary",
"gzip": "ls binary/auto* | xargs gzip"
},
"dependencies": {
Expand Down
12 changes: 5 additions & 7 deletions plugins/brew/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Brew Plugin

Automate the creation of Homebrew formulae.
This plugin can be use with any other package manager plugin.
Automate the creation of Homebrew formulae. This plugin can be use with any other package manager plugin.

> NOTE: This plugin does not work in `lerna` monorepos that use `independent` versioning.
Expand Down Expand Up @@ -38,8 +37,7 @@ To use this plugin you will need to add the required configuration and a templat
}
```

Create a template name `./formula-template.rb` at the root of the project (or use the `formula` option to customize the location)/
The template file must be a valid homebrew ruby file.
Create a template name `./formula-template.rb` at the root of the project (or use the `formula` option to customize the location)/ The template file must be a valid homebrew ruby file.

`auto` will replace the following tokens in the template file:

Expand All @@ -52,14 +50,14 @@ Here is the template `auto` uses to publish it's own `brew` formula:
class Auto < Formula
desc "Generate releases based on semantic version labels on pull requests."
homepage "https://intuit.github.io/auto/home.html"
url "https://github.com/intuit/auto/releases/download/$VERSION/auto-macos.gz"
url "https://github.com/intuit/auto/releases/download/$VERSION/auto-macos-x64.gz"
version "$VERSION"
sha256 "$SHA"

def install
libexec.install Dir["*"]
bin.install libexec/"auto-macos"
mv bin/"auto-macos", bin/"auto"
bin.install libexec/"auto-macos-x64"
mv bin/"auto-macos-x64", bin/"auto"
end

test do
Expand Down

0 comments on commit e082388

Please sign in to comment.