You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
985 B
Plaintext
37 lines
985 B
Plaintext
3 years ago
|
env GOGARBLE=test/main
|
||
4 years ago
|
|
||
3 years ago
|
[exec:git] exec git init -q
|
||
|
[exec:git] exec git config user.name "name"
|
||
|
[exec:git] exec git config user.email "name@email.local"
|
||
|
[exec:git] exec git add go.mod main.go
|
||
|
[exec:git] exec git commit -q -m 'very unique commit message'
|
||
|
[exec:git] exec git rev-parse HEAD
|
||
|
[exec:git] setenvfile HEAD_COMMIT_SHA stdout
|
||
|
|
||
|
garble build -tags veryuniquebuildtag
|
||
|
! binsubstr main$exe '(devel)' 'veryuniquebuildtag' ${HEAD_COMMIT_SHA}
|
||
|
|
||
|
go version -m main$exe
|
||
|
stdout 'main(\.exe)?: unknown'
|
||
|
stdout -count=1 '^.+$' # expect just one line
|
||
5 years ago
|
|
||
4 years ago
|
[short] stop # no need to verify this with -short
|
||
|
|
||
3 years ago
|
go build -tags veryuniquebuildtag
|
||
2 years ago
|
binsubstr main$exe '(devel)' 'veryuniquebuildtag' ${HEAD_COMMIT_SHA}
|
||
3 years ago
|
|
||
|
go version -m main$exe
|
||
|
stdout 'path\s*test/main'
|
||
|
stdout 'mod\s*test/main\s*\(devel\)'
|
||
2 years ago
|
stdout 'build\s*-tags=veryuniquebuildtag'
|
||
|
stdout 'build\s*vcs.revision='${HEAD_COMMIT_SHA}
|
||
4 years ago
|
|
||
5 years ago
|
-- go.mod --
|
||
4 years ago
|
module test/main
|
||
4 years ago
|
|
||
2 years ago
|
go 1.18
|
||
5 years ago
|
-- main.go --
|
||
|
package main
|
||
|
|
||
3 years ago
|
func main() { println("hello world") }
|