mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +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
|
syncthing
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
build
|
||||||
|
13
build.sh
13
build.sh
@ -3,17 +3,20 @@
|
|||||||
version=$(git describe --always)
|
version=$(git describe --always)
|
||||||
|
|
||||||
go test ./... || exit 1
|
go test ./... || exit 1
|
||||||
|
mkdir -p build || exit 1
|
||||||
|
|
||||||
for goos in darwin linux freebsd ; do
|
for goos in darwin linux freebsd ; do
|
||||||
for goarch in amd64 386 ; do
|
for goarch in amd64 386 ; do
|
||||||
echo "$goos-$goarch"
|
echo "$goos-$goarch"
|
||||||
export GOOS="$goos"
|
export GOOS="$goos"
|
||||||
export GOARCH="$goarch"
|
export GOARCH="$goarch"
|
||||||
|
export name="syncthing-$goos-$goarch"
|
||||||
go build -ldflags "-X main.Version $version" \
|
go build -ldflags "-X main.Version $version" \
|
||||||
&& mkdir -p "syncthing-$goos-$goarch" \
|
&& mkdir -p "$name" \
|
||||||
&& mv syncthing "syncthing-$goos-$goarch" \
|
&& mv syncthing "$name" \
|
||||||
&& cp syncthing.ini "syncthing-$goos-$goarch" \
|
&& cp syncthing.ini "$name" \
|
||||||
&& tar zcf "syncthing-$goos-$goarch.tar.gz" "syncthing-$goos-$goarch" \
|
&& tar zcf "$name.tar.gz" "$name" \
|
||||||
&& rm -r "syncthing-$goos-$goarch"
|
&& rm -r "$name" \
|
||||||
|
&& mv "$name.tar.gz" build
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user