Skip to content

Commit

Permalink
fix: fix homebrew update script
Browse files Browse the repository at this point in the history
  • Loading branch information
socsieng committed Apr 15, 2023
1 parent 7aac494 commit dac393f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Expand Up @@ -149,7 +149,7 @@ jobs:
name: Create bottle
run: |
./scripts/update-version.sh ${{ needs.create_release.outputs.tag_name }}
./scripts/bottle.sh ${{ needs.create_release.outputs.tag_name }}
./scripts/bottle.sh ${{ needs.create_release.outputs.tag_name }} catalina
- name: Upload bottle
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
name: Create bottle
run: |
./scripts/update-version.sh ${{ needs.create_release.outputs.tag_name }}
./scripts/bottle.sh ${{ needs.create_release.outputs.tag_name }}
./scripts/bottle.sh ${{ needs.create_release.outputs.tag_name }} big_sur
- name: Upload bottle
if: ${{ needs.create_release.outputs.release_created }}
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
name: Create bottle
run: |
./scripts/update-version.sh ${{ needs.create_release.outputs.tag_name }}
arch -arm64 ./scripts/bottle.sh ${{ needs.create_release.outputs.tag_name }}
arch -arm64 ./scripts/bottle.sh ${{ needs.create_release.outputs.tag_name }} arm64_big_sur
- name: Upload bottle
uses: actions/upload-release-asset@v1
Expand Down
5 changes: 3 additions & 2 deletions scripts/bottle.sh
Expand Up @@ -4,7 +4,8 @@ set -e

cwd=`pwd`
script_folder=`cd $(dirname $0) && pwd`
version=${1:-`cat $script_folder/../version.txt`}
version=$1
target=$2
formula_template=$script_folder/../Formula/sendkeys_template.rb
formula=$script_folder/../Formula/sendkeys.rb
url="file://$cwd/sendkeys.tar.gz"
Expand All @@ -29,7 +30,7 @@ echo "Bottle built"
brew bottle sendkeys --force-core-tap --no-rebuild --root-url "https://github.com/socsieng/sendkeys/releases/download/v${version}"

bottle=`ls sendkeys--$version.*.tar.gz`
bottle_rename=`echo $bottle | sed 's/sendkeys--/sendkeys-/g'`
bottle_rename="sendkeys-$version.$target.bottle.tar.gz"

mv $bottle $bottle_rename

Expand Down

0 comments on commit dac393f

Please sign in to comment.