forked from sendgrid/sendgrid-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paths3upload.sh
More file actions
executable file
·31 lines (26 loc) · 857 Bytes
/
s3upload.sh
File metadata and controls
executable file
·31 lines (26 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# From:
# http://raamdev.com/2008/using-curl-to-upload-files-via-post-to-amazon-s3/
GIT_VERSION=`git rev-parse --short HEAD`
curl -X POST \
-F "key=sendgrid-java/versions/sendgrid-java-$GIT_VERSION.jar" \
-F "acl=public-read" \
-F "AWSAccessKeyId=$S3_ACCESS_KEY" \
-F "Policy=$S3_POLICY" \
-F "Signature=$S3_SIGNATURE" \
-F "Content-Type=application/zip" \
-F "file=@./repo/com/sendgrid/sendgrid-jar.jar" \
https://s3.amazonaws.com/$S3_BUCKET
if [ "$TRAVIS_BRANCH" = "master" ]
then
curl -X POST \
-F "key=sendgrid-java/sendgrid-java.jar" \
-F "acl=public-read" \
-F "AWSAccessKeyId=$S3_ACCESS_KEY" \
-F "Policy=$S3_POLICY" \
-F "Signature=$S3_SIGNATURE" \
-F "Content-Type=application/zip" \
-F "file=@./repo/com/sendgrid/sendgrid-jar.jar" \
https://s3.amazonaws.com/$S3_BUCKET
fi
exit 0