Skip to content

Instantly share code, notes, and snippets.

@luna-duclos
Created September 19, 2016 12:28
Show Gist options
  • Save luna-duclos/d5915dabd9d5231948bea29d1c912cd6 to your computer and use it in GitHub Desktop.
Save luna-duclos/d5915dabd9d5231948bea29d1c912cd6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Resolve the base directory, source vars.sh to setup the environment, then reset the BASEDIR as it'll overwrite it
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
mkdir -p $BASEDIR/build
source $BASEDIR/../../vars.sh
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Run the actual useful build related commands
set -x
cd $BASEDIR
GOARCH=amd64 GOOS=linux CGO_ENABLED=0 go build -o $BASEDIR/build/steam-token-dump steam-token-dump
docker build -t us.gcr.io/psg-delta/cobalt/steam-token-dump:latest $BASEDIR
gcloud docker push us.gcr.io/psg-delta/cobalt/steam-token-dump:latest
# Clean up after ourselves
rm -rf $BASEDIR/build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment