Created
November 16, 2018 20:59
-
-
Save Geri-Borbas/477c01c06f66282f27a45159c1105243 to your computer and use it in GitHub Desktop.
Upload CloudCode scripts to GameSparks using REST API via command line.
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/sh | |
# Zip CloudCode folders | |
zip -r scripts.zip event modules response | |
# Send to GameSparks | |
curl \ | |
--verbose \ | |
--header 'Content-Type: multipart/form-data' \ | |
--header 'Accept: application/json' \ | |
--header 'Authorization: Basic <BASE64_USERNAME:PASSWORD>' \ | |
--form '[email protected]' \ | |
--form 'body={ "selectedFiles" : [ "*" ] }' \ | |
'https://config2.gamesparks.net/restv2/game/<API_KEY>/admin/scripts/import/accept' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment