Sha256: 6c20c091591de613df66f8758b976b7cee498a03cc21f0edec10d2bbc544c137

Contents?: true

Size: 684 Bytes

Versions: 21

Compression:

Stored size: 684 Bytes

Contents

#!/bin/bash -eux

# git push:
#   CODEBUILD_WEBHOOK_HEAD_REF=refs/heads/codebuild
#   CODEBUILD_WEBHOOK_TRIGGER=branch/codebuild
#   CODEBUILD_SOURCE_VERSION=f0eb542 # resolved sha
# cb start:
#   CODEBUILD_SOURCE_VERSION=codebuild

git config --global user.email "tongueroo@gmail.com"
git config --global user.name "Tung Nguyen"

set +u # cb start will not have CODEBUILD_WEBHOOK_TRIGGER set
if [ -n "$CODEBUILD_WEBHOOK_TRIGGER" ]; then # git push
  BRANCH=$(echo $CODEBUILD_WEBHOOK_TRIGGER | sed "s/.*\///")
elif [ -n "$CODEBUILD_SOURCE_VERSION" ]; then # cb start
  BRANCH=$CODEBUILD_SOURCE_VERSION # contains the actual branch
else
  BRANCH=UNKNOWN-BRANCH
fi
git checkout $BRANCH

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
jets-2.3.12 .cody/docs/bin/git_setup.sh
jets-2.3.11 .cody/docs/bin/git_setup.sh
jets-2.3.10 .cody/docs/bin/git_setup.sh
jets-2.3.9 .cody/docs/bin/git_setup.sh
jets-2.3.8 .codebuild/docs/bin/git_setup.sh
jets-2.3.7 .codebuild/docs/bin/git_setup.sh
jets-2.3.6 .codebuild/docs/bin/git_setup.sh
jets-2.3.5 .codebuild/docs/bin/git_setup.sh
jets-2.3.4 .codebuild/docs/bin/git_setup.sh
jets-2.3.3 .codebuild/docs/bin/git_setup.sh
jets-2.3.2 .codebuild/docs/bin/git_setup.sh
jets-2.3.1 .codebuild/docs/bin/git_setup.sh
jets-2.3.0 .codebuild/docs/bin/git_setup.sh
jets-2.2.5 .codebuild/docs/bin/git_setup.sh
jets-2.2.4 .codebuild/docs/bin/git_setup.sh
jets-2.2.3 .codebuild/docs/bin/git_setup.sh
jets-2.2.2 .codebuild/docs/bin/git_setup.sh
jets-2.2.1 .codebuild/docs/bin/git_setup.sh
jets-2.2.0 .codebuild/docs/bin/git_setup.sh
jets-2.1.7 .codebuild/docs/bin/git_setup.sh