File tree 3 files changed +52
-2
lines changed
3 files changed +52
-2
lines changed Original file line number Diff line number Diff line change 1
1
execd
2
+ build
3
+ release
Original file line number Diff line number Diff line change 1
- build : execd
2
- go build .
1
+ NAME =execd
2
+ OWNER =progrium
3
+ ARCH =$(shell uname -m)
4
+ VERSION =0.1.0
5
+
6
+ build :
7
+ mkdir -p build/Linux && GOOS=linux CGO_ENABLED=0 go build -a \
8
+ -installsuffix cgo \
9
+ -o build/Linux/$(NAME )
10
+ mkdir -p build/Darwin && GOOS=darwin CGO_ENABLED=0 go build -a \
11
+ -installsuffix cgo \
12
+ -o build/Darwin/$(NAME )
13
+
14
+ deps :
15
+ go get -u github.com/progrium/gh-release/...
16
+ go get || true
3
17
4
18
example : build
5
19
./execd -h localhost -p 2022 -k example/host_pk.pem example/authcheck example/helloworld
20
+
21
+
22
+ release :
23
+ rm -rf release && mkdir release
24
+ tar -zcf release/$(NAME ) _$(VERSION ) _Linux_$(ARCH ) .tgz -C build/Linux $(NAME )
25
+ tar -zcf release/$(NAME ) _$(VERSION ) _Darwin_$(ARCH ) .tgz -C build/Darwin $(NAME )
26
+ gh-release create $(OWNER ) /$(NAME ) $(VERSION ) $(shell git rev-parse --abbrev-ref HEAD) v$(VERSION )
27
+
28
+ circleci :
29
+ rm ~ /.gitconfig
30
+ rm -rf /home/ubuntu/.go_workspace/src/github.com/$(OWNER ) /$(NAME ) && cd .. \
31
+ && mkdir -p /home/ubuntu/.go_workspace/src/github.com/$(OWNER ) \
32
+ && mv $(NAME ) /home/ubuntu/.go_workspace/src/github.com/$(OWNER ) /$(NAME ) \
33
+ && ln -s /home/ubuntu/.go_workspace/src/github.com/$(OWNER ) /$(NAME ) $(NAME )
Original file line number Diff line number Diff line change
1
+ dependencies :
2
+ pre :
3
+ - make circleci
4
+ override :
5
+ - make deps
6
+ - make build
7
+ post :
8
+ - tar -czvf $CIRCLE_ARTIFACTS/execd-linux.tgz -C build/Linux execd
9
+ - tar -czvf $CIRCLE_ARTIFACTS/execd-darwin.tgz -C build/Darwin execd
10
+ - tar -czvf $CIRCLE_ARTIFACTS/go-workspace.tgz -C ~/.go_workspace .
11
+
12
+ test :
13
+ override :
14
+ - /bin/true
15
+
16
+ deployment :
17
+ release :
18
+ branch : release
19
+ commands :
20
+ - make release
You can’t perform that action at this time.
0 commit comments