This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #609 from sym3tri/release-script-fixes
Release script fixes
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash -e | ||
# | ||
# A utility script for executing arbitrary local scripts via docker. | ||
# This can be used for executing build/release scripts locally in our build container in the absence of Jenkins. | ||
# | ||
# USAGE: | ||
# | ||
# With env vars: | ||
# MYVAR=foo OTHERVAR=bar DOCKER_ENV=MYVAR,OTHERVAR ./builder-run ./my-script --my-script-arg1 --my-script-arg2 | ||
# | ||
# Without env vars: | ||
# ./builder-run ./my-script --my-script-arg1 --my-script-arg2 | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# forward whitelisted env variables to docker | ||
ENV_STR="" | ||
for VAR in ${DOCKER_ENV//,/ }; do | ||
ENV_STR="$ENV_STR -e $VAR=${!VAR}" | ||
done | ||
|
||
PROJECT=$SCRIPT_DIR | ||
set -x | ||
docker run --user="${BUILDER_RUN_USER}" $ENV_STR --rm -v $PROJECT:/go/src/github.com/coreos/tectonic-installer -w /go/src/coreos/tectonic-installer $DOCKER_RUN_ARGS $BUILDER_IMAGE $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
#!/bin/bash -e | ||
|
||
# USAGE: | ||
# export GITHUB_CREDENTIALS=username:personal-access-token | ||
# export TECTONIC_RELEASE_TARBALL_URL=url-of-tarball | ||
# export VERSION=w.x.y-tectonic.z | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source "$DIR/common.env.sh" | ||
|
||
GITHUB_API_URL="https://api.github.com/repos/coreos-inc/tectonic/releases" | ||
GITHUB_API_URL="https://api.github.com/repos/coreos/tectonic-installer/releases" | ||
|
||
echo "Creating new release on GitHub" | ||
curl \ | ||
--fail \ | ||
-u "$GITHUB_CREDENTIALS" \ | ||
-H "Content-Type: application/json" \ | ||
-d "{\"tag_name\":\"$VERSION\",\"body\":\"Release tarball is available at $TECTONIC_RELEASE_TARBALL_URL.\"}" \ | ||
-d "{\"tag_name\":\"$VERSION\",\"prerelease\":true,\"body\":\"Release tarball is available at $TECTONIC_RELEASE_TARBALL_URL.\"}" \ | ||
$GITHUB_API_URL | ||
|