Last active
June 13, 2019 12:38
-
-
Save davyngugi/7c3b325aaa4177150143eeccb8e6b347 to your computer and use it in GitHub Desktop.
Grab the git commit hash from the downloaded bundle by aws codedeploy agent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIR=`tar -tzf bundle.tar | head -1 | cut -f1 -d"/"` | |
echo $DIR | |
IFS='-' | |
read -ra ADDR <<< "$DIR" | |
echo "${ADDR[-1]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment