Created
July 14, 2021 13:13
-
-
Save waiyanwh/05684b26e5a172f0321da707e954bba2 to your computer and use it in GitHub Desktop.
This file contains 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 | |
user= | |
token= | |
newdev=25165825 | |
newqa=25100295 | |
dev=25034777 | |
qa=25198603 | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $1 <environment>" | |
exit 1 | |
fi | |
case "$1" in | |
newdev) | |
environment=newdev | |
filename=newdev | |
id=25165825 ;; | |
newqa) | |
environment=newqa | |
filename=newqa | |
id=25100295 ;; | |
dev) | |
environment=dev | |
filename=dev | |
id=25034777 ;; | |
qa) | |
environment=qa | |
filename=qa | |
id=25198603 ;; | |
*) ;; | |
esac | |
#curl -s -u $user:$token "https://dopevs.atlassian.net/wiki/rest/api/content/$id" | jq | |
curl -s -u $user:$token -XPOST -H "X-Atlassian-Token: no-check" -F "file=@$filename" -F "comment=Update developer config for $environment" "https://dopevs.atlassian.net/wiki/rest/api/content/$id/child/attachment" | jq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment