Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit 4902e36

Browse files
authored
Merge pull request #23 from hellofresh/patch/fix-build-script
Fix version injection in build.sh
2 parents 17303a4 + 3a71e68 commit 4902e36

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ fi
1212
echo "Building application version $VERSION"
1313

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

1717
# Build 386 amd64 binaries
1818
OS_PLATFORM_ARG=(linux darwin windows)
1919
OS_ARCH_ARG=(386 amd64)
2020
for OS in ${OS_PLATFORM_ARG[@]}; do
2121
for ARCH in ${OS_ARCH_ARG[@]}; do
2222
echo "Building binary for $OS/$ARCH..."
23-
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
23+
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
2424
done
2525
done
2626

@@ -30,6 +30,6 @@ OS_ARCH_ARG=(arm arm64)
3030
for OS in ${OS_PLATFORM_ARG[@]}; do
3131
for ARCH in ${OS_ARCH_ARG[@]}; do
3232
echo "Building binary for $OS/$ARCH..."
33-
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
33+
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
3434
done
3535
done

0 commit comments

Comments
 (0)