Update dist scripts to use hc-releases instead of bintray
This commit is contained in:
parent
944ba1ef17
commit
d7f5f02831
8
Makefile
8
Makefile
|
@ -8,19 +8,23 @@ default: deps generate test dev
|
|||
|
||||
ci: deps test
|
||||
|
||||
release: deps test releasebin
|
||||
release: deps test releasebin package
|
||||
|
||||
bin: deps
|
||||
@echo "WARN: 'make bin' is for debug / test builds only. Use 'make release' for release builds."
|
||||
@sh -c "$(CURDIR)/scripts/build.sh"
|
||||
|
||||
releasebin: deps
|
||||
@grep 'const VersionPrerelease = ""' version.go > /dev/null ; if [ $$? -ne 0 ]; then \
|
||||
@grep 'const VersionPrerelease = "dev"' version.go > /dev/null ; if [ $$? -eq 0 ]; then \
|
||||
echo "ERROR: You must remove prerelease tags from version.go prior to release."; \
|
||||
exit 1; \
|
||||
fi
|
||||
@sh -c "$(CURDIR)/scripts/build.sh"
|
||||
|
||||
package:
|
||||
$(if $(VERSION),,@echo 'VERSION= needed to release; Use make package skip compilation'; exit 1)
|
||||
@sh -c "$(CURDIR)/scripts/dist.sh $(VERSION)"
|
||||
|
||||
deps:
|
||||
go get github.com/mitchellh/gox
|
||||
go get golang.org/x/tools/cmd/stringer
|
||||
|
|
|
@ -12,13 +12,7 @@ cd $DIR
|
|||
# Get the version from the command line
|
||||
VERSION=$1
|
||||
if [ -z $VERSION ]; then
|
||||
echo "Please specify a version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure we have a bintray API key
|
||||
if [ -z $BINTRAY_API_KEY ]; then
|
||||
echo "Please set your bintray API key in the BINTRAY_API_KEY env var."
|
||||
echo "Please specify version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -45,13 +39,4 @@ pushd ./pkg/dist >/dev/null 2>&1
|
|||
shasum -a256 * > ./packer_${VERSION}_SHA256SUMS
|
||||
popd >/dev/null 2>&1
|
||||
|
||||
echo "==> Uploading..."
|
||||
for ARCHIVE in ./pkg/dist/*; do
|
||||
ARCHIVE_NAME=$(basename ${ARCHIVE})
|
||||
|
||||
echo Uploading: $ARCHIVE_NAME
|
||||
curl \
|
||||
-T ${ARCHIVE} \
|
||||
-umitchellh:${BINTRAY_API_KEY} \
|
||||
"https://api.bintray.com/content/mitchellh/packer/packer/${VERSION}/${ARCHIVE_NAME}"
|
||||
done
|
||||
echo "==> Push with hc-releases"
|
Loading…
Reference in New Issue