Skip to content

Commit 6e4d00e

Browse files
committed
edit makefileto support dep
fix makefile and add release
1 parent ce4b6b2 commit 6e4d00e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10362
-9097
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ aliyuncli.egg-info/
1212
build/
1313
dist/
1414
out/
15+
releases/
1516
resource/metas.go
1617
local-*

Gopkg.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
export VERSION=3.0.1
2+
export RELEASE_PATH="releases/aliyun-cli-${VERSION}"
23

34
all: build
45
publish: build build_mac build_linux build_windows
56

67
deps:
78
-go get github.com/aliyun/aliyun-openapi-meta
89
go get -u github.com/jteeuwen/go-bindata/...
9-
go get -u github.com/Masterminds/glide
10-
glide install
10+
go get -u github.com/golang/dep/cmd/dep
11+
dep ensure
1112

1213
testdeps: deps
1314

@@ -25,18 +26,35 @@ install: build
2526
cp out/aliyun /usr/local/bin
2627

2728
build_mac:
28-
GOOS=darwin GOARCH=amd64 go build -o out/aliyun main/main.go
29+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go
2930
tar zcvf out/aliyun-cli-macosx-${VERSION}-amd64.tgz -C out aliyun
3031
aliyun oss cp out/aliyun-cli-macosx-${VERSION}-amd64.tgz oss://aliyun-cli --force --profile oss
3132

3233
build_linux:
33-
GOOS=linux GOARCH=amd64 go build -o out/aliyun main/main.go
34+
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go
3435
tar zcvf out/aliyun-cli-linux-${VERSION}-amd64.tgz -C out aliyun
3536
aliyun oss cp out/aliyun-cli-linux-${VERSION}-amd64.tgz oss://aliyun-cli --force --profile oss
3637

3738
build_windows:
38-
GOOS=windows GOARCH=amd64 go build -o aliyun.exe main/main.go
39+
GOOS=windows GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o aliyun.exe main/main.go
3940
zip -r out/aliyun-cli-windows-${VERSION}-amd64.zip aliyun.exe
4041
aliyun oss cp out/aliyun-cli-windows-${VERSION}-amd64.zip oss://aliyun-cli --force --profile oss
4142
rm aliyun.exe
4243

44+
git_release: clean build make_release_dir release_mac release_linux release_windows
45+
46+
make_release_dir:
47+
mkdir -p ${RELEASE_PATH}
48+
49+
release_mac:
50+
GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go
51+
tar zcvf ${RELEASE_PATH}/aliyun-cli-darwin-amd64.tar.gz -C out aliyun
52+
53+
release_linux:
54+
GOOS=linux GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o out/aliyun main/main.go
55+
tar zcvf ${RELEASE_PATH}/aliyun-cli-linux-amd64.tar.gz -C out aliyun
56+
57+
release_windows:
58+
GOOS=windows GOARCH=amd64 go build -ldflags "-X 'github.com/aliyun/aliyun-cli/cli.Version=${VERSION}'" -o aliyun.exe main/main.go
59+
zip -r ${RELEASE_PATH}/aliyun-cli-windows-amd64.exe.zip aliyun.exe
60+
rm aliyun.exe

vendor/golang.org/x/sys/unix/mkerrors.sh

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/mkpost.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_linux.go

Lines changed: 22 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/syscall_openbsd.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/golang.org/x/sys/unix/zerrors_linux_386.go

Lines changed: 135 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)