Jean-François Paris
e86fb5eedd
Add support for GOARM parameter when cross compiling
...
Go can cross compile to older ARM architectures (e.g. v5). In order to
do so one needs to use the GOARM parameter as documented in
https://github.com/golang/go/wiki/GoArm
2018-02-04 14:15:12 +00:00
Alexander Neumann
02f4f5dc66
Update build.go, correct version detection
2018-01-12 22:06:42 +01:00
Alexander Neumann
d00fe95f10
Upgrade min Go version to 1.8
2017-08-06 21:47:04 +02:00
Alexander Neumann
59e18bce0a
Fix build.go
2017-07-23 14:25:39 +02:00
Alexander Neumann
9cd422791a
Update build.go
2017-07-23 14:25:38 +02:00
Fabian Wickborn
52004cdde8
Allow absolute target path in build.go
...
Fixes #1099 .
2017-07-14 11:54:46 +02:00
Alexander Neumann
de48a5ac9c
build.go: Strip temporary path, allow reproducible builds
2017-05-29 23:27:25 +02:00
Alexander Neumann
c49da4c6f7
build.go: Add --enable-cgo
2017-05-25 11:03:29 +02:00
Pauline Middelink
971ecee171
Fix ineffassign mistakes
2017-05-17 01:25:52 +02:00
Alexander Neumann
e6ca604d24
build.go: Also copy header files
2017-04-19 17:31:07 +02:00
Alexander Neumann
f8dd5d5088
Check version in build.go
...
Print a sensible error for Go < 1.7 (the "context" package is missing
there)
2017-03-09 11:29:24 +01:00
Alexander Neumann
7e0a4c66e7
build.go: Make binaries completely static (disables cgo)
2017-01-12 19:51:26 +01:00
Alexander Neumann
62b1056860
build.go: Allow setting the output file name
2017-01-12 19:51:08 +01:00
Alexander Neumann
166d1811a1
Remove timestamp from version
command
...
This enables reproducible builds, for details see
https://reproducible-builds.org/docs/timestamps/
2016-12-19 21:14:12 +01:00
Alexander Neumann
1815536534
Update build.go
2016-12-03 11:14:30 +01:00
Zlatko Čalušić
7e66b73ce0
Stop trying to detect Go version
...
It fails on pre-release versions, anyway. It's enough to mention the oldest
supported version in README.md. Anything older than two latest Go releases
is bad idea, anyway, 'cause it's unsupported by Go development team.
Closes #680
2016-12-01 20:06:23 +01:00
Alexander Neumann
1ad4d1aafd
Require Go 1.6 or greater
2016-08-16 20:32:58 +02:00
Alexander Neumann
68ec29e7ec
Invert go version test for ldflags
2016-08-03 22:04:03 +02:00
Vincent Rischmann
d2834b61fb
Detect a devel version correctly in LDFlags()
2016-08-01 20:47:33 +02:00
mappu
983e509388
build.go: gofmt
2016-07-16 10:14:41 +12:00
mappu
c9400d5c61
build.go: Support cross-compilation via new --goos
and --goarch
flags
2016-07-16 09:42:41 +12:00
mappu
f967e90a96
build.go: Strip harder (add -w
flag)
2016-07-16 09:42:22 +12:00
mappu
38d4522ea5
build.go: Add go1.7 to list of linkers requiring -Xfoo=bar
syntax
2016-07-16 09:42:02 +12:00
Fabian Wickborn
ee494ab939
Use relocated command folders in build.go and run_integration_tests.go
...
The resulting command structure is almost compatible to that of that gb
reference project (example-gsftp), as the subfolder for commands is
'cmds' instead of 'cmd'.
2016-02-23 09:18:09 +01:00
Alexander Neumann
96e66bb3e9
Update build.go and run_integration_tests.go
2016-02-20 17:31:22 +01:00
Alexander Neumann
841326d713
Move build.go and run_integration_tests.go to root
2016-02-20 17:31:21 +01:00
Alexander Neumann
b63399d606
Move things around for gb
...
This moves all restic source files to src/, and all vendored
dependencies to vendor/src.
2016-02-20 17:31:20 +01:00
Alexander Neumann
2499bbb09d
Also specify new -X
syntax for go1.6
2016-01-16 14:08:13 +01:00
Alexander Neumann
9aefc2b7a6
Merge pull request #281 from restic/version-with-git
...
build.go: use new combined version string
2015-08-26 20:53:24 +02:00
Alexander Neumann
39a82d951b
Refactor getVersion(), address code review comments
2015-08-26 20:17:51 +02:00
Alexander Neumann
a54f9715b1
Add "build: " prefix to verbose messages
2015-08-26 20:03:26 +02:00
Alexander Neumann
4c47c2b2c9
Address code review comments
2015-08-26 20:03:16 +02:00
Alexander Neumann
f3c64d0740
build.go: use new combined version string
...
Previously, when a VERSION file exists it takes precendence over the
git version. This is unfortunate because all restic binaries compiled
from a git checkout will just identify as the latest release (e.g.
'0.1.0'), regardeless of any commits on top of it.
This commit adds a combined version string by using the contents of
the VERSION file, and append the current git version returned by `git
describe` if available, e.g.:
0.1.0 (v0.1.0-6-gb188217-dirty).
2015-08-25 22:20:53 +02:00
Alexander Neumann
dca200c2e9
build.go: Make -ldflags
compatible to Go 1.5
...
This change uses the old syntax (-ldflags "-X foo bar") for Go <= 1.4
and the new syntax for (-ldflags "-X foo=bar") for Go 1.5 (without a
warning).
2015-08-25 22:07:52 +02:00
Alexander Neumann
10232155ef
build.go: make sure to exit 1 on error
2015-08-19 21:40:36 +02:00
Alexander Neumann
59751645be
build.go: allow running tests in temporary GOPATH
2015-08-19 20:24:52 +02:00
Florian Weingarten
38f1a8d0a9
Allow building without git
2015-08-19 00:35:34 -04:00
Klaus Post
347e800b4e
Set output binary name in a variable.
2015-08-16 14:20:37 +02:00
Klaus Post
5d5f3de62f
Output EXE file on Windows platform.
2015-08-14 15:08:07 +02:00
Alexander Neumann
7738709f7a
Support build tags for build.go
2015-06-24 20:29:58 +02:00
Alexander Neumann
9e9177ab73
Add build.go
2015-06-24 20:29:58 +02:00