mirror of
https://github.com/octoleo/syncthing.git
synced 2024-09-19 05:09:01 +00:00
Add ./build.sh noupgrade and all-noupgrade
This commit is contained in:
parent
ab952e6103
commit
5231a09820
99
build.sh
99
build.sh
@ -119,6 +119,52 @@ transifex() {
|
|||||||
assets
|
assets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build-all() {
|
||||||
|
rm -f *.tar.gz *.zip
|
||||||
|
test -short || exit 1
|
||||||
|
assets
|
||||||
|
|
||||||
|
rm -rf bin Godeps/_workspace/pkg $GOPATH/pkg/*/github.com/syncthing
|
||||||
|
for os in darwin-amd64 freebsd-amd64 freebsd-386 linux-amd64 linux-386 windows-amd64 windows-386 solaris-amd64 ; do
|
||||||
|
export GOOS=${os%-*}
|
||||||
|
export GOARCH=${os#*-}
|
||||||
|
|
||||||
|
build $*
|
||||||
|
|
||||||
|
name="syncthing-${os/darwin/macosx}-$version"
|
||||||
|
case $GOOS in
|
||||||
|
windows)
|
||||||
|
zipDist "$name"
|
||||||
|
rm -f syncthing.exe
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
tarDist "$name"
|
||||||
|
rm -f syncthing
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
export GOOS=linux
|
||||||
|
export GOARCH=arm
|
||||||
|
|
||||||
|
origldflags="$ldflags"
|
||||||
|
|
||||||
|
export GOARM=7
|
||||||
|
ldflags="$origldflags -X main.GoArchExtra v7"
|
||||||
|
build $*
|
||||||
|
tarDist "syncthing-linux-armv7-$version"
|
||||||
|
|
||||||
|
export GOARM=6
|
||||||
|
ldflags="$origldflags -X main.GoArchExtra v6"
|
||||||
|
build $*
|
||||||
|
tarDist "syncthing-linux-armv6-$version"
|
||||||
|
|
||||||
|
export GOARM=5
|
||||||
|
ldflags="$origldflags -X main.GoArchExtra v5"
|
||||||
|
build $*
|
||||||
|
tarDist "syncthing-linux-armv5-$version"
|
||||||
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"")
|
"")
|
||||||
shift
|
shift
|
||||||
@ -130,6 +176,11 @@ case "$1" in
|
|||||||
rm -rf bin Godeps/_workspace/pkg $GOPATH/pkg/*/github.com/syncthing
|
rm -rf bin Godeps/_workspace/pkg $GOPATH/pkg/*/github.com/syncthing
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
noupgrade)
|
||||||
|
export GOBIN=$(pwd)/bin
|
||||||
|
godep go install -tags noupgrade -ldflags "$ldflags" ./cmd/...
|
||||||
|
;;
|
||||||
|
|
||||||
race)
|
race)
|
||||||
build -race
|
build -race
|
||||||
;;
|
;;
|
||||||
@ -160,49 +211,13 @@ case "$1" in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
all)
|
all)
|
||||||
rm -f *.tar.gz *.zip
|
shift
|
||||||
test -short || exit 1
|
build-all
|
||||||
assets
|
;;
|
||||||
|
|
||||||
for os in darwin-amd64 freebsd-amd64 freebsd-386 linux-amd64 linux-386 windows-amd64 windows-386 solaris-amd64 ; do
|
|
||||||
export GOOS=${os%-*}
|
|
||||||
export GOARCH=${os#*-}
|
|
||||||
|
|
||||||
build
|
|
||||||
|
|
||||||
name="syncthing-${os/darwin/macosx}-$version"
|
|
||||||
case $GOOS in
|
|
||||||
windows)
|
|
||||||
zipDist "$name"
|
|
||||||
rm -f syncthing.exe
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
tarDist "$name"
|
|
||||||
rm -f syncthing
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
export GOOS=linux
|
|
||||||
export GOARCH=arm
|
|
||||||
|
|
||||||
origldflags="$ldflags"
|
|
||||||
|
|
||||||
export GOARM=7
|
|
||||||
ldflags="$origldflags -X main.GoArchExtra v7"
|
|
||||||
build
|
|
||||||
tarDist "syncthing-linux-armv7-$version"
|
|
||||||
|
|
||||||
export GOARM=6
|
|
||||||
ldflags="$origldflags -X main.GoArchExtra v6"
|
|
||||||
build
|
|
||||||
tarDist "syncthing-linux-armv6-$version"
|
|
||||||
|
|
||||||
export GOARM=5
|
|
||||||
ldflags="$origldflags -X main.GoArchExtra v5"
|
|
||||||
build
|
|
||||||
tarDist "syncthing-linux-armv5-$version"
|
|
||||||
|
|
||||||
|
all-noupgrade)
|
||||||
|
shift
|
||||||
|
build-all -tags noupgrade
|
||||||
;;
|
;;
|
||||||
|
|
||||||
upload)
|
upload)
|
||||||
|
@ -8,7 +8,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/syncthing/syncthing/files"
|
"github.com/syncthing/syncthing/files"
|
||||||
"github.com/syncthing/syncthing/lamport"
|
"github.com/syncthing/syncthing/lamport"
|
||||||
@ -594,6 +593,7 @@ func TestLocalVersion(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
var gf protocol.FileInfo
|
var gf protocol.FileInfo
|
||||||
|
|
||||||
func TestStressGlobalVersion(t *testing.T) {
|
func TestStressGlobalVersion(t *testing.T) {
|
||||||
@ -652,3 +652,4 @@ func stressWriter(s *files.Set, id protocol.NodeID, set1, set2 []protocol.FileIn
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user