Created
February 8, 2023 06:06
-
-
Save henteko/84794f91da38b2417044509a1450a76a 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
curl \ | |
--url https://deploygate.com/api/users/${OWNER_NAME}/platforms/${PLATFORM_TYPE}/apps/${APP_ID}/distributions \ | |
-H "Authorization: Bearer ${API_TOKEN}" \ | |
-X GET | \ | |
jq '.results.distributions[] | select(.updated_at < (now - 31*24*60*60)).access_key' | \ | |
xargs -I {} \ | |
curl --url https://deploygate.com/api/distributions/{} \ | |
-H "Authorization: Bearer ${API_TOKEN}" \ | |
-X DELETE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment