Skip to content

Commit

Permalink
Add version & release script
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Jan 29, 2018
1 parent 8e6d6e5 commit e67f54c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/aurto
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -eu
version="0.1"
command=${1:-}
arg1=${2:-}

Expand All @@ -22,7 +23,7 @@ elif [ "$command" == "remove" ] && [ -n "$arg1" ]; then
echo -e "aurto: Removed \\e[36m$removed\\e[39m" >&2
fi
else
echo -e "Simple management tool for the 'aurto' repository"
echo -e " Usage: \\e[32maurto add\\e[39m|\\e[32mremove \\e[36mPACKAGES\\e[39m"
echo -e "\\e[1maurto \\e[21mv$version: simple management tool for the 'aurto' repository"
echo -e " Usage: \\e[32maurto add\\e[39m|\\e[32mremove \\e[36mPACKAGES...\\e[39m"
exit 1
fi
25 changes: 25 additions & 0 deletions release
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -eu
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$dir"

tagname="v$(grep version= bin/aurto | cut -d'"' -f2)"
if git rev-parse "$tagname" >/dev/null 2>&1
then
echo "tag $tagname already exists" >&2
exit 1
fi

echo "Release $tagname"
read -p "continue? [y/N] " -n 1 -r
echo
if ! [[ $REPLY =~ ^[^Nn]$ ]]; then
exit 0
fi

git tag -s "$tagname" -m "Release $tagname"
git push --tags

echo "Pushed tag $tagname to repo, ready to add notes"
gio open "https://github.com/alexheretic/aurto/releases/new?tag=$tagname"

0 comments on commit e67f54c

Please sign in to comment.