File tree Expand file tree Collapse file tree 4 files changed +20
-13
lines changed Expand file tree Collapse file tree 4 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 1
1
cmd /envelope /envelope
2
2
cmd /envelope /keyring.yaml
3
3
cmd /envelope /test. *
4
+ build /*
4
5
.envrc
5
6
vendor
Original file line number Diff line number Diff line change 4
4
deploy :
5
5
provider : releases
6
6
api_key : " $GITHUB_AUTH"
7
- file :
8
- - cmd/envelope/envelope-${TRAVIS_TAG}-linux-amd64
9
- - cmd/envelope/envelope-${TRAVIS_TAG}-darwin-amd64
10
- - cmd/envelope/envelope-${TRAVIS_TAG}-windows-amd64
7
+ file_glob : true
8
+ file : " build/envelope-*"
11
9
skip_cleanup : true
12
10
on :
13
11
tags : true
Original file line number Diff line number Diff line change 1
- version =$(shell git describe --all | sed -e's/.* \///g')
1
+ repo =github.com/mikesimons/envelope
2
+ version =$(shell git describe --all --dirty --long | awk -F"-|/" '/^heads/ {print $$2 "@" substr($$4, 2) "!" $$5}; /^tags/ { print $$2 }')
3
+ build_args =-ldflags "-X main.envelope_version_string=$(version ) " $(repo ) /cmd/envelope
2
4
3
5
.PHONY : test dev-deps
4
6
5
- all : test cmd/envelope/envelope- $( version ) -linux-amd64 cmd/envelope/envelope- $( version ) -darwin-amd64 cmd/envelope/envelope- $( version ) -windows-amd64
7
+ all : test build
6
8
7
- cmd/envelope/envelope-$(version ) -linux-amd64 :
8
- GOARCH=amd64 GOOS=linux cd cmd/envelope && go build -o $@
9
+ build : build-linux build-darwin build-windows
9
10
10
- cmd/envelope/envelope-$(version ) -darwin-amd64 :
11
- GOARCH=amd64 GOOS=darwin cd cmd/envelope && go build -o $@
11
+ build-linux : build/envelope-$(version ) -linux-amd64
12
+ build/envelope-$(version ) -linux-amd64 :
13
+ GOARCH=amd64 GOOS=linux go build -o $@ $(build_args )
12
14
13
- cmd/envelope/envelope-$(version ) -windows-amd64 :
14
- GOARCH=amd64 GOOS=windows cd cmd/envelope && go build -o $@
15
+ build-darwin : build/envelope-$(version ) -darwin-amd64
16
+ build/envelope-$(version ) -darwin-amd64 :
17
+ GOARCH=amd64 GOOS=darwin go build -o $@ $(build_args )
18
+
19
+ build-windows : build/envelope-$(version ) -windows-amd64
20
+ build/envelope-$(version ) -windows-amd64 :
21
+ GOARCH=amd64 GOOS=windows go build -o $@ $(build_args )
15
22
16
23
dev-deps :
17
24
go get github.com/Masterminds/glide
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ import (
8
8
)
9
9
10
10
var COLLECT_DEBUG = true
11
+ var envelope_version_string = "dev"
11
12
12
13
func main () {
13
14
app := cli .NewApp ()
14
15
app .Name = "envelope"
15
16
app .Usage = "Envelope secrets encryption"
16
- app .Version = "0.0.1"
17
+ app .Version = envelope_version_string
17
18
18
19
app .Flags = []cli.Flag {
19
20
cli.StringFlag {
You can’t perform that action at this time.
0 commit comments