-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 for aah CLI v0.12.2 Release
- Loading branch information
Showing
3 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,25 +14,25 @@ echo "Publish for version: $version" | |
|
||
# Build for macOS | ||
echo "Starting aah CLI build for macOS" | ||
build_dir="/tmp/aah_cli_mac_$version" | ||
build_dir="/tmp/aah-cli-mac-$version" | ||
mkdir -p $build_dir | ||
env GOOS=darwin GOARCH=amd64 go build -o $build_dir/aah -ldflags="-s -w -X main.CliPackaged=true" | ||
cd $build_dir && zip aah_darwin_amd64.zip aah | ||
cd $build_dir && zip aah-darwin-amd64.zip aah | ||
|
||
# sha256 and upload to aah server | ||
sha256=$(/usr/bin/shasum -a 256 $build_dir/aah_darwin_amd64.zip | cut -d " " -f 1) | ||
sha256=$(/usr/bin/shasum -a 256 $build_dir/aah-darwin-amd64.zip | cut -d " " -f 1) | ||
echo "sha256 $sha256" | ||
echo "Uploading aah CLI macOS binary to aah server" | ||
ssh [email protected] "mkdir -p /srv/www/aahframework.org/public/releases/cli/$version" | ||
scp $build_dir/aah_darwin_amd64.zip [email protected]:/srv/www/aahframework.org/public/releases/cli/$version | ||
scp $build_dir/aah-darwin-amd64.zip [email protected]:/srv/www/aahframework.org/public/releases/cli/$version | ||
|
||
# update homebrew tap | ||
echo "Updating Homebrew Tap for macOS" | ||
if [ ! -d "$GOPATH/src/github.com/go-aah/homebrew-tap" ]; then | ||
git clone [email protected]:go-aah/homebrew-tap.git $GOPATH/src/github.com/go-aah/homebrew-tap | ||
fi | ||
cd $GOPATH/src/github.com/go-aah/homebrew-tap | ||
sed -i '' -e 's/cli\/.*\/aah_darwin_amd64.zip/cli\/'"$version"'\/aah_darwin_amd64.zip/g' ./Formula/aah.rb | ||
sed -i '' -e 's/cli\/.*\/aah-darwin-amd64.zip/cli\/'"$version"'\/aah-darwin-amd64.zip/g' ./Formula/aah.rb | ||
sed -i '' -e 's/sha256 ".*"/sha256 "'"$sha256"'"/g' ./Formula/aah.rb | ||
sed -i '' -e 's/version ".*"/version "'"$version"'"/g' ./Formula/aah.rb | ||
git add -u && git commit -m "brew tap update with $version release" && git push | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters