File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
1
version : ' 2'
2
2
3
- vars :
4
- TEST_VERSIONSTRING : " 0.0.0-test.preview"
5
- TEST_COMMIT : " deadbeef"
6
- TEST_LDFLAGS_VALUE : >
7
- '-X github.com/arduino/arduino-cli/version.versionString={{.TEST_VERSIONSTRING}}
8
- -X github.com/arduino/arduino-cli/version.commit={{.TEST_COMMIT}}'
9
-
10
3
tasks :
11
4
build :
12
5
desc : Build the project
13
6
cmds :
14
- - go build -v -i
7
+ - go build -v -i -ldflags {{.LDFLAGS_VALUE}}
15
8
16
9
test :
17
10
desc : Run the full testsuite
@@ -28,3 +21,20 @@ tasks:
28
21
desc : Run integration tests only
29
22
cmds :
30
23
- go test -run Integration {{ default "-v" .GOFLAGS }} {{ default "./..." .TARGETS }} -ldflags {{.TEST_LDFLAGS_VALUE}}
24
+
25
+
26
+ vars :
27
+ # build flags
28
+ VERSIONSTRING : " 0.3.6-alpha.preview"
29
+ COMMIT :
30
+ sh : echo ${TRAVIS_COMMIT:-`git log -n 1 --format=%h`}
31
+ LDFLAGS_VALUE : >
32
+ '-X github.com/arduino/arduino-cli/version.versionString={{.VERSIONSTRING}}
33
+ -X github.com/arduino/arduino-cli/version.commit={{.COMMIT}}'
34
+
35
+ # test flags
36
+ TEST_VERSIONSTRING : " 0.0.0-test.preview"
37
+ TEST_COMMIT : " deadbeef"
38
+ TEST_LDFLAGS_VALUE : >
39
+ '-X github.com/arduino/arduino-cli/version.versionString={{.TEST_VERSIONSTRING}}
40
+ -X github.com/arduino/arduino-cli/version.commit={{.TEST_COMMIT}}'
You can’t perform that action at this time.
0 commit comments