mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
Build artefacts in build dir
This commit is contained in:
parent
976baff44f
commit
001a6724ec
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
syncthing
|
||||
*.tar.gz
|
||||
build
|
||||
|
13
build.sh
13
build.sh
@ -3,17 +3,20 @@
|
||||
version=$(git describe --always)
|
||||
|
||||
go test ./... || exit 1
|
||||
mkdir -p build || exit 1
|
||||
|
||||
for goos in darwin linux freebsd ; do
|
||||
for goarch in amd64 386 ; do
|
||||
echo "$goos-$goarch"
|
||||
export GOOS="$goos"
|
||||
export GOARCH="$goarch"
|
||||
export name="syncthing-$goos-$goarch"
|
||||
go build -ldflags "-X main.Version $version" \
|
||||
&& mkdir -p "syncthing-$goos-$goarch" \
|
||||
&& mv syncthing "syncthing-$goos-$goarch" \
|
||||
&& cp syncthing.ini "syncthing-$goos-$goarch" \
|
||||
&& tar zcf "syncthing-$goos-$goarch.tar.gz" "syncthing-$goos-$goarch" \
|
||||
&& rm -r "syncthing-$goos-$goarch"
|
||||
&& mkdir -p "$name" \
|
||||
&& mv syncthing "$name" \
|
||||
&& cp syncthing.ini "$name" \
|
||||
&& tar zcf "$name.tar.gz" "$name" \
|
||||
&& rm -r "$name" \
|
||||
&& mv "$name.tar.gz" build
|
||||
done
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user