Skip to content

Commit c546c42

Browse files
committed
makefile: Stop releasing binary
Signed-off-by: Jingwen Peng <[email protected]>
1 parent 7c2896e commit c546c42

File tree

1 file changed

+3
-47
lines changed

1 file changed

+3
-47
lines changed

Makefile

+3-47
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ help:
2626
@echo " test to run service test"
2727
@echo " release to build and release current version"
2828
@echo " release-source to pack the source code"
29-
@echo " release-headers to build and pack the headers source code for go 1.7"
30-
@echo " release-binary to build the static binary for go 1.7"
3129
@echo " clean to clean the coverage files"
3230

3331
all: check build unit release
@@ -146,60 +144,18 @@ test:
146144
pushd "./test"; go run *.go; popd
147145
@echo "ok"
148146

149-
release: release-source release-source-with-vendor release-headers release-binary
147+
release: release-source release-source-with-vendor
150148

151149
release-source:
152150
@echo "pack the source code"
153151
mkdir -p "release"
154-
zip -FS "release/${PREFIX}-source-v${VERSION}.zip" ${FILES_TO_RELEASE}
152+
@zip -FS "release/${PREFIX}-source-v${VERSION}.zip" ${FILES_TO_RELEASE}
155153
@echo "ok"
156154

157155
release-source-with-vendor:
158156
@echo "pack the source code"
159157
mkdir -p "release"
160-
zip -FS "release/${PREFIX}-source-with-vendor-v${VERSION}.zip" ${FILES_TO_RELEASE_WITH_VENDOR}
161-
@echo "ok"
162-
163-
release-headers: release-headers-go-1.7
164-
165-
release-headers-go-1.7:
166-
@echo "build and pack the headers source code for go 1.7"
167-
mkdir -p "release"
168-
mkdir -p "/tmp/${PREFIX}-headers/"
169-
for file in ${FILES_TO_RELEASE}; do \
170-
filepath="/tmp/${PREFIX}-headers/$$(dirname $${file})/binary.go"; \
171-
mkdir -p "$$(dirname $${filepath})"; \
172-
package_line=$$(cat "$${file}" | grep -E "^package"); \
173-
echo -ne "//go:binary-only-package\n\n" > "$${filepath}"; \
174-
echo -ne "$${package_line}" >> "$${filepath}"; \
175-
done
176-
pushd "/tmp/${PREFIX}-headers/"; \
177-
zip -r "/tmp/${PREFIX}-headers-v${VERSION}-go-1.7.zip" .; \
178-
popd
179-
cp "/tmp/${PREFIX}-headers-v${VERSION}-go-1.7.zip" "release/"
180-
rm -f "/tmp/${PREFIX}-headers-v${VERSION}-go-1.7.zip"
181-
rm -rf "/tmp/${PREFIX}-headers"
182-
@echo "ok"
183-
184-
release-binary: release-binary-go-1.7
185-
186-
release-binary-go-1.7:
187-
@echo "build the static binary for go 1.7"
188-
mkdir -p "release"
189-
for pkg in ${PKGS_TO_RELEASE}; do \
190-
GOOS=linux GOARCH=amd64 go install $${pkg}; \
191-
GOOS=darwin GOARCH=amd64 go install $${pkg}; \
192-
GOOS=windows GOARCH=amd64 go install $${pkg}; \
193-
done
194-
cross=(linux_amd64 darwin_amd64 windows_amd64); \
195-
for os_arch in $${cross[@]}; do \
196-
MAIN_GOPATH=$$(echo "${GOPATH}" | awk '{split($$1,p,":"); print(p[1])}'); \
197-
pushd "$${MAIN_GOPATH}/pkg/$${os_arch}/github.com/yunify/qingcloud-sdk-go"; \
198-
zip -r "/tmp/${PREFIX}-binary-v${VERSION}-$${os_arch}-go-1.7.zip" .; \
199-
popd; \
200-
cp "/tmp/${PREFIX}-binary-v${VERSION}-$${os_arch}-go-1.7.zip" "release/"; \
201-
rm -f "/tmp/${PREFIX}-binary-v${VERSION}-$${os_arch}-go-1.7.zip"; \
202-
done
158+
@zip -FS "release/${PREFIX}-source-with-vendor-v${VERSION}.zip" ${FILES_TO_RELEASE_WITH_VENDOR}
203159
@echo "ok"
204160

205161
clean:

0 commit comments

Comments
 (0)