build: make nocgo default
parent
edff8721cf
commit
2fecf640de
7
make.sh
7
make.sh
|
@ -16,15 +16,10 @@ for PLATFORM in $PLATFORMS; do
|
||||||
GOOS=${PLATFORM%/*}
|
GOOS=${PLATFORM%/*}
|
||||||
GOARCH=${PLATFORM#*/}
|
GOARCH=${PLATFORM#*/}
|
||||||
BIN_FILENAME="${PROJ}"
|
BIN_FILENAME="${PROJ}"
|
||||||
CMD="GOOS=${GOOS} GOARCH=${GOARCH} go build ${LDFLAGS} -o ${DIST}/${BIN_FILENAME} cmd/gterm/main.go"
|
CMD="CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build ${LDFLAGS} -o ${DIST}/${BIN_FILENAME} cmd/gterm/main.go"
|
||||||
echo "${CMD}"
|
echo "${CMD}"
|
||||||
eval $CMD || FAILURES="${FAILURES} ${PLATFORM}"
|
eval $CMD || FAILURES="${FAILURES} ${PLATFORM}"
|
||||||
sh -c "cd ${DIST} && tar -czf ${PROJ}-${VERSION}-${GOOS}-${GOARCH}.tar.gz ${BIN_FILENAME} && rm ${BIN_FILENAME}"
|
sh -c "cd ${DIST} && tar -czf ${PROJ}-${VERSION}-${GOOS}-${GOARCH}.tar.gz ${BIN_FILENAME} && rm ${BIN_FILENAME}"
|
||||||
|
|
||||||
# build netgo ver
|
|
||||||
CMD="CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build ${LDFLAGS} -o ${DIST}/${BIN_FILENAME} cmd/gterm/main.go"
|
|
||||||
eval $CMD
|
|
||||||
sh -c "cd ${DIST} && tar -czf ${PROJ}-${VERSION}-${GOOS}-${GOARCH}-nocgo.tar.gz ${BIN_FILENAME} && rm ${BIN_FILENAME}"
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue