Skip to content

Instantly share code, notes, and snippets.

@jcpst
Last active December 10, 2015 18:52
Show Gist options
  • Save jcpst/0fae6d896fa9120b886e to your computer and use it in GitHub Desktop.
Save jcpst/0fae6d896fa9120b886e to your computer and use it in GitHub Desktop.
Codeship - Convert golang template from image_tag to environmental variables
echo $1 | sed -e 's/{\.//g' \
-e 's/}}/}/g' \
-e 's/{/\${/g' \
-e 's/\([A-Z]\)/_\1/g' \
-e 's/I_D/ID/' \
-e 's/\${/\${CI/g' \
| tr [a-z] [A-Z]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment