Skip to content
This repository was archived by the owner on Feb 5, 2020. It is now read-only.

Release script fixes #609

Merged
merged 4 commits into from
May 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions builder-run
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 $@
9 changes: 7 additions & 2 deletions installer/scripts/release/make_github_release.sh
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