Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.
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
6 changes: 3 additions & 3 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ fi
echo "Building application version $VERSION"

echo "Building default binary"
CGO_ENABLED=0 go build -ldflags "-s -w" -ldflags "-X cmd.version=${VERSION}" -o "dist/github-cli" $PKG_SRC
CGO_ENABLED=0 go build -ldflags "-s -w" -ldflags "-X github.com/hellofresh/github-cli/cmd.version=${VERSION}" -o "dist/github-cli" $PKG_SRC

# Build 386 amd64 binaries
OS_PLATFORM_ARG=(linux darwin windows)
OS_ARCH_ARG=(386 amd64)
for OS in ${OS_PLATFORM_ARG[@]}; do
for ARCH in ${OS_ARCH_ARG[@]}; do
echo "Building binary for $OS/$ARCH..."
GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w" -ldflags "-X cmd.version=${VERSION}" -o "dist/github-cli_$OS-$ARCH" $PKG_SRC
GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w" -ldflags "-X github.com/hellofresh/github-cli/cmd.version=${VERSION}" -o "dist/github-cli_$OS-$ARCH" $PKG_SRC
done
done

Expand All @@ -30,6 +30,6 @@ OS_ARCH_ARG=(arm arm64)
for OS in ${OS_PLATFORM_ARG[@]}; do
for ARCH in ${OS_ARCH_ARG[@]}; do
echo "Building binary for $OS/$ARCH..."
GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w" -ldflags "-X cmd.version=${VERSION}" -o "dist/github-cli_$OS-$ARCH" $PKG_SRC
GOARCH=$ARCH GOOS=$OS CGO_ENABLED=0 go build -ldflags "-s -w" -ldflags "-X github.com/hellofresh/github-cli/cmd.version=${VERSION}" -o "dist/github-cli_$OS-$ARCH" $PKG_SRC
done
done