|
|
|
@ -45,6 +45,8 @@ go_build() { |
|
|
|
|
release_real_bin="$release_str/$os-$arch/$(basename $package)" |
|
|
|
|
# Release sha256sum name |
|
|
|
|
release_sha256sum="$release_str/$os-$arch/$(basename $package).${release_tag}.sha256sum" |
|
|
|
|
# Release sha256sum default |
|
|
|
|
release_sha256sum_default="$release_str/$os-$arch/$(basename $package).sha256sum" |
|
|
|
|
|
|
|
|
|
# Go build to build the binary. |
|
|
|
|
if [ "${arch}" == "arm" ]; then |
|
|
|
@ -60,10 +62,13 @@ go_build() { |
|
|
|
|
|
|
|
|
|
# Release sha256sum name |
|
|
|
|
release_sha256sum_6="$release_str/$os-${arch}6vl/$(basename $package).${release_tag}.sha256sum" |
|
|
|
|
# Release sha256sum default |
|
|
|
|
release_sha256sum_default_6="$release_str/$os-${arch}6vl/$(basename $package).sha256sum" |
|
|
|
|
|
|
|
|
|
# Calculate shasum |
|
|
|
|
shasum_str=$(${SHASUM} -a 256 ${release_bin_6}) |
|
|
|
|
echo ${shasum_str} | $SED "s/$release_str\/$os-${arch}6vl\///g" > $release_sha256sum_6 |
|
|
|
|
$CP -p $release_sha256sum_6 $release_sha256sum_default_6 |
|
|
|
|
|
|
|
|
|
# Release binary downloadable name |
|
|
|
|
release_real_bin_7="$release_str/$os-$arch/$(basename $package)" |
|
|
|
@ -77,10 +82,13 @@ go_build() { |
|
|
|
|
|
|
|
|
|
# Release sha256sum name |
|
|
|
|
release_sha256sum_7="$release_str/$os-$arch/$(basename $package).${release_tag}.sha256sum" |
|
|
|
|
# Release sha256sum default |
|
|
|
|
release_sha256sum_default_7="$release_str/$os-${arch}/$(basename $package).sha256sum" |
|
|
|
|
|
|
|
|
|
# Calculate sha256sum |
|
|
|
|
shasum_str=$(${SHASUM} -a 256 ${release_bin_7}) |
|
|
|
|
echo ${shasum_str} | $SED "s/$release_str\/$os-$arch\///g" > $release_sha256sum_7 |
|
|
|
|
$CP -p $release_sha256sum_7 $release_sha256sum_default_7 |
|
|
|
|
else |
|
|
|
|
GOOS=$os GOARCH=$arch go build --ldflags "${LDFLAGS}" -o $release_bin |
|
|
|
|
|
|
|
|
@ -94,6 +102,7 @@ go_build() { |
|
|
|
|
# Calculate shasum |
|
|
|
|
sha256sum_str=$(${SHASUM} -a 256 ${release_bin}) |
|
|
|
|
echo ${sha256sum_str} | $SED "s/$release_str\/$os-$arch\///g" > $release_sha256sum |
|
|
|
|
$CP -p $release_sha256sum $release_sha256sum_default |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|