From be140ab496034f3b585d70859b652d4452ec3e03 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 11 Dec 2016 22:19:17 +0100 Subject: Moved extract-changes.hs and github-upload.sh to tools/. --- tools/extract-changes.hs | 9 +++++++++ tools/github-upload.sh | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tools/extract-changes.hs create mode 100755 tools/github-upload.sh (limited to 'tools') diff --git a/tools/extract-changes.hs b/tools/extract-changes.hs new file mode 100644 index 000000000..8c8160c2c --- /dev/null +++ b/tools/extract-changes.hs @@ -0,0 +1,9 @@ +-- Extract changes from latest version in changelog. +import Text.Pandoc.JSON + +main = toJSONFilter extractFirst + +extractFirst :: Pandoc -> Pandoc +extractFirst (Pandoc meta (Para{} : BulletList bs : _)) = + Pandoc meta [BulletList bs] +extractFirst x = x diff --git a/tools/github-upload.sh b/tools/github-upload.sh new file mode 100755 index 000000000..875d51831 --- /dev/null +++ b/tools/github-upload.sh @@ -0,0 +1,18 @@ +#!/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.pkg.zip \ + "https://uploads.github.com/repos/jgm/pandoc/releases/$VERSION/assets?name=$FULLNAME.pkg.zip" + +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/$VERSION/assets?name=$FULLNAME.msi" + -- cgit v1.2.3