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)
|
version=$(git describe --always)
|
||||||
buildDir=dist
|
buildDir=dist
|
||||||
|
|
||||||
if [[ -z $1 ]] ; then
|
if [[ $1 == "-f" ]] ; then
|
||||||
|
fast=yes
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $fast != yes ]] ; then
|
||||||
|
go get
|
||||||
go test ./...
|
go test ./...
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $1 ]] ; then
|
||||||
go build -ldflags "-X main.Version $version" \
|
go build -ldflags "-X main.Version $version" \
|
||||||
&& nrsc syncthing gui
|
&& nrsc syncthing gui
|
||||||
elif [[ $1 == "tar" ]] ; then
|
elif [[ $1 == "tar" ]] ; then
|
||||||
go test ./...
|
|
||||||
go build -ldflags "-X main.Version $version" \
|
go build -ldflags "-X main.Version $version" \
|
||||||
&& nrsc syncthing gui \
|
&& nrsc syncthing gui \
|
||||||
&& mkdir syncthing-dist \
|
&& mkdir syncthing-dist \
|
||||||
&& cp syncthing README.md LICENSE syncthing-dist \
|
&& cp syncthing README.md LICENSE syncthing-dist \
|
||||||
&& tar zcvf syncthing-dist.tar.gz syncthing-dist \
|
&& tar zcvf syncthing-dist.tar.gz syncthing-dist \
|
||||||
&& rm -rf syncthing-dist
|
&& rm -rf syncthing-dist
|
||||||
else
|
elif [[ $1 == "all" ]] ; then
|
||||||
go test ./... || exit 1
|
|
||||||
|
|
||||||
rm -rf "$buildDir"
|
rm -rf "$buildDir"
|
||||||
mkdir -p "$buildDir" || exit 1
|
mkdir -p "$buildDir" || exit 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user