Skip to content

Commit

Permalink
Problem: released linux binaries don't use static linking
Browse files Browse the repository at this point in the history
Solution:
- use static-linking in release script
  • Loading branch information
yihuang committed Apr 3, 2023
1 parent bd7251b commit 8cb71ac
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@ build() {
name="$3"
pkg="cronosd${network}-${build_type}"
if [[ "$host" == "native" ]]; then
FLAKE="${baseurl}#${pkg}"
if [[ "${build_platform: -6}" == "-linux" ]]; then
# static link for linux targets
FLAKE="${baseurl}#legacyPackages.${build_platform}.pkgsStatic.cronos-matrix.${pkg}"
else
FLAKE="${baseurl}#${pkg}"
fi
else
FLAKE="${baseurl}#legacyPackages.${build_platform}.pkgsCross.${host}.cronos-matrix.${pkg}"
if [[ "$host" == "aarch64-multiplatform" || "$host" == "gnu64" ]]; then
# static link for linux targets
FLAKE="${baseurl}#legacyPackages.${build_platform}.pkgsCross.${host}.pkgsStatic.cronos-matrix.${pkg}"
else
FLAKE="${baseurl}#legacyPackages.${build_platform}.pkgsCross.${host}.cronos-matrix.${pkg}"
fi
fi
echo "building $FLAKE"
nix build -L "$FLAKE"
Expand Down

0 comments on commit 8cb71ac

Please sign in to comment.