Skip to content

Commit

Permalink
Add target to ease tag and release
Browse files Browse the repository at this point in the history
  • Loading branch information
ardumont committed Jul 15, 2015
1 parent 30b9cb4 commit 4d6ef19
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION=$$(grep "^;; Version: " markdown-toc.el | cut -f3 -d' ')
PACKAGE_FOLDER=markdown-toc-$(VERSION)
MODE_NAME=markdown-toc
VERSION=$$(grep "^;; Version: " $(MODE_NAME).el | cut -f3 -d' ')
PACKAGE_FOLDER=$(MODE_NAME)-$(VERSION)
ARCHIVE=$(PACKAGE_FOLDER).tar
USER=ardumont
EMACS=emacs

.PHONY: clean
Expand Down Expand Up @@ -41,5 +41,8 @@ package: clean pkg-el
info:
cask info

release:
./release.sh $(VERSION)

install-cask:
curl -fsSkL https://raw.github.com/cask/cask/master/go | python
31 changes: 31 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

if [ $# -ne 1 ]; then
cat <<EOF
Use: $0 <VERSION>"
- VERSION version to release (0.1.6 for example)
To install the token, execute the install-marmalade-token.sh.
EOF
exit 1;
fi

WDIR=$(dirname $0)

VERSION=$1

# launched from the current dev branch

git fetch -p --all

git checkout master

git merge origin/master

git tag $VERSION

git push origin --tag

make package

./upload-to-marmalade.sh
16 changes: 16 additions & 0 deletions upload-to-marmalade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# depends on curl

uploadFile () {
local username=$1
local tokenFile=$(cat $2)
local packageFile=$3
local marmaladeUrl=${4:-"https://marmalade-repo.org"}
curl --insecure \
-F "name=${username}" \
-F "token=$tokenFile" \
-F "package=@${packageFile};filename=$(basename ${packageFile})" \
$marmaladeUrl/v1/packages
}

uploadFile ardumont ~/.marmalade/token ./markdown-toc.el

0 comments on commit 4d6ef19

Please sign in to comment.