Skip to content

Commit

Permalink
Merge pull request #26 from ivancoppa/patch-1
Browse files Browse the repository at this point in the history
create base data
  • Loading branch information
al4 committed Feb 4, 2016
2 parents 222ec10 + 5af7135 commit 6cbebe3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions json_examples/create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
PORT=5000
auth_token=$(curl -s -X GET http://localhost:${PORT}/token --user alforbes:moreblabla | json_pp | grep token | cut -d '"' -f 4)
echo auth_token
ril=$(curl -s -H "X-Auth-Token: $auth_token" -H "Content-Type: application/json" -X POST "http://127.0.0.1:${PORT}/releases" -d @./releases.json | grep 'id' | cut -d '"' -f 4)
echo $ril
curl -s -H "X-Auth-Token: $auth_token" -H "Content-Type: application/json" -X POST "http://127.0.0.1:${PORT}/releases/${ril}/packages" -d @./package.json

echo "Relase created: ${ril}"


curl -H "X-Auth-Token: $auth_token" -v -X POST "http://127.0.0.1:${PORT}/releases/${ril}/deploy"; echo

0 comments on commit 6cbebe3

Please sign in to comment.