summaryrefslogtreecommitdiff
path: root/github-upload.sh
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-12-01 10:30:44 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-12-01 10:30:44 -0800
commitce35b23487c5a9e2459bd33e4b9442849ee9f614 (patch)
tree22924354d882c4bf6c76c449f3012e07e9d0ef44 /github-upload.sh
parent1f6238f3ba1999988fbb2b25b091171451647d4e (diff)
Added github-upload.sh.
Diffstat (limited to 'github-upload.sh')
-rw-r--r--github-upload.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/github-upload.sh b/github-upload.sh
new file mode 100644
index 000000000..2a5f6534d
--- /dev/null
+++ b/github-upload.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/bash
+
+VERSION=$1
+FULLNAME=pandoc-$VERSION
+read -s -p "Token (https://github.com/settings/applications): " TOKEN
+
+curl -H "Authorization: token $TOKEN" \
+ -H "Accept: application/vnd.github.manifold-preview" \
+ -H "Content-Type: application/x-apple-diskimage" \
+ --data-binary @$FULLNAME.dmg \
+ "https://uploads.github.com/repos/jgm/pandoc/releases/$FULLNAME/assets?name=$FULLNAME.dmg"
+
+curl -H "Authorization: token $TOKEN" \
+ -H "Accept: application/vnd.github.manifold-preview" \
+ -H "Content-Type: application/x-msi" \
+ --data-binary @$FULLNAME.msi \
+ "https://uploads.github.com/repos/jgm/pandoc/releases/$FULLNAME/assets?name=$FULLNAME.msi"
+