Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making releaser script print the compile steps #89

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions releaser.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ fi

if [ -z "$(git status --porcelain)" ]; then
echo "Working directory clean (as it should be)"
echo "Pushing the code..."
git push origin main
if [ $? -ne 0 ]; then
echo "Something went wrong when running 'git push origin main'"
echo "Cannot continue."
return
fi
else
echo "Working directory is not clean. Cannot proceed"
return 1
Expand Down Expand Up @@ -69,24 +62,28 @@ if [ $? -ne 0 ]; then
fi

# Now compile the codebase for all the specified targets. Output the resulting binaries into the newly created folder
echo "Building for GOOS=linux GOARCH=arm64"
GOOS=linux GOARCH=arm64 go build -o tmp/bark_release_$RELEASEVERSION/bark_${RELEASEVERSION}_linux_arm64 ./cmd/server
if [ $? -ne 0 ]; then
echo "Could not compile for linux/arm64"
return 1
fi

echo "Building for GOOS=linux GOARCH=amd64"
GOOS=linux GOARCH=amd64 go build -o tmp/bark_release_$RELEASEVERSION/bark_${RELEASEVERSION}_linux_amd64 ./cmd/server
if [ $? -ne 0 ]; then
echo "Could not compile for linux/amd64"
return 1
fi

echo "Building for GOOS=darwin GOARCH=arm64"
GOOS=darwin GOARCH=arm64 go build -o tmp/bark_release_$RELEASEVERSION/bark_${RELEASEVERSION}_macos_arm64 ./cmd/server
if [ $? -ne 0 ]; then
echo "Could not compile for darwin/arm64"
return 1
fi

echo "Building for GOOS=darwin GOARCH=amd64"
GOOS=darwin GOARCH=amd64 go build -o tmp/bark_release_$RELEASEVERSION/bark_${RELEASEVERSION}_macos_amd64 ./cmd/server
if [ $? -ne 0 ]; then
echo "Could not compile for darwin/amd64"
Expand Down