Makefile rule for building all linux binaries, and upload all ARCHs
This commit is contained in:
parent
e47801074e
commit
6260dd1018
11
Makefile
11
Makefile
|
@ -6,6 +6,17 @@ build: prepare
|
|||
"-X main.Version $(VERSION)" \
|
||||
./cmd/telegraf/telegraf.go
|
||||
|
||||
build-linux-bins: prepare
|
||||
GOARCH=amd64 GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_amd64 \
|
||||
-ldflags "-X main.Version $(VERSION)" \
|
||||
./cmd/telegraf/telegraf.go
|
||||
GOARCH=386 GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_386 \
|
||||
-ldflags "-X main.Version $(VERSION)" \
|
||||
./cmd/telegraf/telegraf.go
|
||||
GOARCH=arm GOOS=linux $(GOPATH)/bin/godep go build -o telegraf_linux_arm \
|
||||
-ldflags "-X main.Version $(VERSION)" \
|
||||
./cmd/telegraf/telegraf.go
|
||||
|
||||
prepare:
|
||||
go get github.com/tools/godep
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@ Latest:
|
|||
* http://get.influxdb.org/telegraf/telegraf_0.1.8_amd64.deb
|
||||
* http://get.influxdb.org/telegraf/telegraf-0.1.8-1.x86_64.rpm
|
||||
|
||||
Binaries:
|
||||
* http://get.influxdb.org/telegraf/telegraf_0.1.8_linux_x86_64.tar.gz
|
||||
|
||||
0.1.4:
|
||||
* http://get.influxdb.org/telegraf/telegraf_0.1.4_amd64.deb
|
||||
* http://get.influxdb.org/telegraf/telegraf-0.1.4-1.x86_64.rpm
|
||||
|
|
10
package.sh
10
package.sh
|
@ -303,13 +303,15 @@ if [ "$CIRCLE_BRANCH" == "" ]; then
|
|||
echo "Upload failed -- aborting".
|
||||
cleanup_exit 1
|
||||
fi
|
||||
rm $filepath
|
||||
done
|
||||
|
||||
# Upload binaries
|
||||
for b in ${BINS[*]}; do
|
||||
zippedbin=${b}_${VERSION}_linux_x86_64.tar.gz
|
||||
# Make and upload linux amd64, 386, and arm
|
||||
make build-linux-bins
|
||||
for b in `ls telegraf_*`; do
|
||||
zippedbin=${b}_${VERSION}.tar.gz
|
||||
# Zip the binary
|
||||
tar -zcf $TMP_WORK_DIR/$zippedbin -C $GOPATH_INSTALL/bin ./$b
|
||||
tar -zcf $TMP_WORK_DIR/$zippedbin ./$b
|
||||
echo "Uploading binary: $zippedbin to S3"
|
||||
AWS_CONFIG_FILE=$AWS_FILE aws s3 cp $TMP_WORK_DIR/$zippedbin \
|
||||
s3://get.influxdb.org/telegraf/$zippedbin \
|
||||
|
|
Loading…
Reference in New Issue