Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

export CGO_ENABLED=0

Manav Rathi2101d06d3258
diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml
index dabfc8dcf7..1efa805d44 100644
--- a/.github/workflows/cli-release.yml
+++ b/.github/workflows/cli-release.yml
@@ -47,5 +47,8 @@ jobs:
release_name: ${{ github.ref_name }}
goversion: "1.20"
project_path: "./cli"
+ pre_command: export CGO_ENABLED=0
+ build_flags: "-trimpath"
+ ldflags: "-s -w"
md5sum: false
sha256sum: true
diff --git a/cli/release.sh b/cli/release.sh
index a2d0a0be5b..ac0106bd07 100755
--- a/cli/release.sh
+++ b/cli/release.sh
@@ -9,6 +9,7 @@ OS_TARGETS=("windows" "linux" "darwin")
# Corresponding architectures for each OS
ARCH_TARGETS=("386 amd64" "386 amd64 arm arm64" "amd64 arm64")
+export CGO_ENABLED=0
# Loop through each OS target
for index in "${!OS_TARGETS[@]}"
do
@@ -28,7 +29,7 @@ do
fi
# Build the binary and place it in the "bin" directory
- go build -o "bin/$BINARY_NAME" main.go
+ go build -ldflags="-s -w" -trimpath -o "bin/$BINARY_NAME" main.go
# Print a message indicating the build is complete for the current OS and architecture
echo "Built for $OS ($ARCH) as bin/$BINARY_NAME"