forked from progrium/go-basher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 1.75 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
NAME=go-basher
OWNER=progrium
BASH_DIR=.bash
BASH_STATIC_VERSION=5.1.008-1.2.2
test:
go test -v
build:
go install || true
deps:
go get -u github.com/a-urth/go-bindata/...
bash:
# Don't run if you don't have to. Adds several megs to repo with every commit.
rm -rf $(BASH_DIR) && mkdir -p $(BASH_DIR)/linux-arm $(BASH_DIR)/linux-arm64 $(BASH_DIR)/linux-amd64 $(BASH_DIR)/osx-amd64
curl -#SLk https://github.com/robxu9/bash-static/releases/download/$(BASH_STATIC_VERSION)/bash-linux-aarch64 \
> $(BASH_DIR)/linux-arm64/bash
curl -#SLk https://github.com/robxu9/bash-static/releases/download/$(BASH_STATIC_VERSION)/bash-linux-armv7 \
> $(BASH_DIR)/linux-arm/bash
curl -#SLk https://github.com/robxu9/bash-static/releases/download/$(BASH_STATIC_VERSION)/bash-linux-x86_64 \
> $(BASH_DIR)/linux-amd64/bash
curl -#SLk https://github.com/robxu9/bash-static/releases/download/$(BASH_STATIC_VERSION)/bash-macos-x86_64 \
> $(BASH_DIR)/osx-amd64/bash
chmod +x $(BASH_DIR)/*/bash
go-bindata -tags=linux,arm -o=bash_linux_arm.go -prefix=$(BASH_DIR)/linux-arm -pkg=basher $(BASH_DIR)/linux-arm
go-bindata -tags=linux,arm64 -o=bash_linux_arm64.go -prefix=$(BASH_DIR)/linux-arm64 -pkg=basher $(BASH_DIR)/linux-arm64
go-bindata -tags=linux,amd64 -o=bash_linux_amd64.go -prefix=$(BASH_DIR)/linux-amd64 -pkg=basher $(BASH_DIR)/linux-amd64
go-bindata -tags=darwin,amd64 -o=bash_darwin_amd64.go -prefix=$(BASH_DIR)/osx-amd64 -pkg=basher $(BASH_DIR)/osx-amd64
circleci:
rm ~/.gitconfig
rm -rf /home/ubuntu/.go_workspace/src/github.com/$(OWNER)/$(NAME) && cd .. \
&& mkdir -p /home/ubuntu/.go_workspace/src/github.com/$(OWNER) \
&& mv $(NAME) /home/ubuntu/.go_workspace/src/github.com/$(OWNER)/$(NAME) \
&& ln -s /home/ubuntu/.go_workspace/src/github.com/$(OWNER)/$(NAME) $(NAME)