Skip to content

Instantly share code, notes, and snippets.

@mrosset
Last active December 10, 2015 02:38
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mrosset/4369378 to your computer and use it in GitHub Desktop.
Save mrosset/4369378 to your computer and use it in GitHub Desktop.
#!/bin/bash
# This is a simple build script and will be executed on your CI system if
# available. Otherwise it will execute while your application is stopped
# before the deploy step. This script gets executed directly, so it
# could be python, php, ruby, etc.
tarball="https://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz"
# Set GOROOT since we dont use GOROOT_FINAL
export GOROOT="$OPENSHIFT_HOMEDIR/app-root/data/go"
# GOPATH can be our repo dir.
export GOPATH="$OPENSHIFT_REPO_DIR"
# if we do not have a go dir, download and extract dist tarball
if ! test -d "$GOROOT"; then
curl -# $tarball | tar xz -C $(dirname "$GOROOT")
fi
# Finally build and install
# Use full path to to go command so we don't have to mess with PATH
"$GOROOT/bin/go" install thumbs
@elimisteve
Copy link

Where does this script go? Should it be called build? Thanks.

@elimisteve
Copy link

Answer: It should go in .openshift/action_hooks/build within the OpenShift app repo

@mrosset
Copy link
Author

mrosset commented Jan 2, 2013

sorry late response, I did not get an email. glad you got it sorted out though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment