File tree 3 files changed +15
-4
lines changed
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 10
10
name : Build
11
11
command : |
12
12
./ci-build-script.sh .
13
+ cp ./digitalocean-dynamic-ip.sample.json ./releases/
13
14
- persist_to_workspace :
14
15
root : .
15
16
paths :
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ digitalocean-dynamic-ip.json
5
5
6
6
# GoLand IDE
7
7
.idea /
8
- releases
8
+ releases
Original file line number Diff line number Diff line change @@ -6,18 +6,28 @@ if [[ -z "$package" ]]; then
6
6
fi
7
7
package_split=(${package// \/ / } )
8
8
package_name=${package_split[-1]}
9
- platforms=(" windows/amd64" " windows/386" " darwin/amd64" " linux/386" " linux/amd64" " linux/arm" " linux/arm64" )
10
- mkdir releases
9
+ # see https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications for RPi arm versions
10
+ # see https://github.com/golang/go/wiki/GoArm
11
+ platforms=(" windows/amd64" " windows/386" " darwin/amd64" " linux/386" " linux/amd64" " linux/arm/6" " linux/arm/7" " linux/arm64/8" " freebsd/386" " freebsd/amd64" )
12
+ mkdir -p releases
11
13
for platform in " ${platforms[@]} "
12
14
do
13
15
platform_split=(${platform// \/ / } )
14
16
GOOS=${platform_split[0]}
15
17
GOARCH=${platform_split[1]}
18
+ GOARM=${platform_split[2]}
16
19
output_name=' digitalocean-dynamic-dns-ip-' $GOOS ' -' $GOARCH
20
+ if [[ ! -z " $GOARM " ]]; then
21
+ output_name+=" v${GOARM} "
22
+ # arm v8 is only supported for ARCH=arm64 and requires an empty GOARM version
23
+ if [[ " 8" -eq " $GOARM " ]]; then
24
+ GOARM=" "
25
+ fi
26
+ fi
17
27
if [ $GOOS = " windows" ]; then
18
28
output_name+=' .exe'
19
29
fi
20
- env GOOS=$GOOS GOARCH=$GOARCH go build -o releases/$output_name $package_name
30
+ env GOOS=" $GOOS " GOARCH=" $GOARCH " GOARM= " $GOARM " go build -o " releases/$output_name " " $package_name "
21
31
if [ $? -ne 0 ]; then
22
32
echo ' An error has occurred! Aborting the script execution...'
23
33
exit 1
You can’t perform that action at this time.
0 commit comments