Skip to content

Commit 37d8461

Browse files
committed
Merge remote-tracking branch 'origin/main' into main
2 parents e298892 + dac5bb5 commit 37d8461

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

build_arm_and_upload.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22

33
# This script is used to build the ARM binaries and upload to the github draft release.
44
# Just run this script from your Mac M1 or Linux ARM machine, if you want to build and upload the ARM binaries.
5+
# This script requires the tag to be built as an argument(eg: ./build_arm_and_upload.sh v1.4.0-rc.2 where v1.4.0-rc.2
6+
# is the tag to be built.)
57

8+
# Pull and checkout the tag
9+
git checkout main
10+
git pull
11+
git checkout $1
12+
13+
# Build from the tag
614
cd fdw
715
make clean
816
make go
917
make
10-
make release
11-
cd -
18+
19+
# Run the upload script
20+
./../upload_arm_asset.sh $1

upload_arm_asset.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,7 @@ do
1818
fi
1919
done
2020

21-
# get the tag_names of draft releases
22-
TAG=$(gh api -X GET /repos/{owner}/{repo}/releases -F owner=turbot -F repo=steampipe --jq '.[] | select(.draft == true) | .tag_name')
23-
24-
# count the number of draft releases
25-
COUNT=$(echo "$TAG" | wc -l | tr -d ' ')
26-
27-
if [[ "$COUNT" == "1" ]]; then
28-
gzip steampipe_postgres_fdw.so
29-
mv steampipe_postgres_fdw.so.gz steampipe_postgres_fdw.so.darwin_arm64.gz
30-
gh release upload ${TAG} steampipe_postgres_fdw.so.darwin_arm64.gz
31-
else
32-
echo "contains more than 1 draft releases"
33-
fi
21+
# Zip, rename and upload the binary
22+
gzip steampipe_postgres_fdw.so
23+
mv steampipe_postgres_fdw.so.gz steampipe_postgres_fdw.so.darwin_arm64.gz
24+
gh release upload $1 steampipe_postgres_fdw.so.darwin_arm64.gz

0 commit comments

Comments
 (0)