Created
March 12, 2020 12:15
-
-
Save trmaphi/fed508ccaab3da24885146ac7acf9ae5 to your computer and use it in GitHub Desktop.
Notify slack incoming webhooks about current deployment
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
#!/usr/bin/env bash | |
TARGET=$(git describe --dirty --broken --all --long); | |
PROJECT=$(git config remote.origin.url |sed 's#.*\/\(.*\)\.git#\1#'); | |
git pull && \ | |
curl -i \ | |
-H "Content-Type:application/json" \ | |
-X POST \ | |
-d "{\"text\": \"deployed \`${PROJECT}\` \`$TARGET\` to \`$1\` \"}" \ | |
$WEBHOOK_URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment