mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-22 22:58:25 +00:00
Do go get as part of build unless fast build requested (fixes #31)
This commit is contained in:
parent
6e11e3cda9
commit
a18f6c6d90
16
build.sh
16
build.sh
@ -3,21 +3,27 @@
|
||||
version=$(git describe --always)
|
||||
buildDir=dist
|
||||
|
||||
if [[ -z $1 ]] ; then
|
||||
if [[ $1 == "-f" ]] ; then
|
||||
fast=yes
|
||||
shift
|
||||
fi
|
||||
|
||||
if [[ $fast != yes ]] ; then
|
||||
go get
|
||||
go test ./...
|
||||
fi
|
||||
|
||||
if [[ -z $1 ]] ; then
|
||||
go build -ldflags "-X main.Version $version" \
|
||||
&& nrsc syncthing gui
|
||||
elif [[ $1 == "tar" ]] ; then
|
||||
go test ./...
|
||||
go build -ldflags "-X main.Version $version" \
|
||||
&& nrsc syncthing gui \
|
||||
&& mkdir syncthing-dist \
|
||||
&& cp syncthing README.md LICENSE syncthing-dist \
|
||||
&& tar zcvf syncthing-dist.tar.gz syncthing-dist \
|
||||
&& rm -rf syncthing-dist
|
||||
else
|
||||
go test ./... || exit 1
|
||||
|
||||
elif [[ $1 == "all" ]] ; then
|
||||
rm -rf "$buildDir"
|
||||
mkdir -p "$buildDir" || exit 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user