Skip to content

Instantly share code, notes, and snippets.

View vechorko's full-sized avatar
🤡
Problems?

Dmitry Vechorko vechorko

🤡
Problems?
View GitHub Profile
#!/bin/sh
export CI=true
export CODEBUILD=true
export CODEBUILD_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)
export CODEBUILD_GIT_BRANCH="$(git symbolic-ref HEAD --short 2>/dev/null)"
if [ "$CODEBUILD_GIT_BRANCH" = "" ] ; then
CODEBUILD_GIT_BRANCH="$(git branch -a --contains HEAD | sed -n 2p | awk '{ printf $1 }')";