Skip to content

Commit

Permalink
Add package-source.sh helper
Browse files Browse the repository at this point in the history
Automates creating a source tarball with the right
folder name inside
  • Loading branch information
rfjakob committed Jan 28, 2018
1 parent db76b3b commit 5c9d739
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions package-source.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -eux

# Get git version, something like "v1.2.3"
GITVERSION=$(git describe --tags --dirty)
# Drop leading "v" to get just "1.2.3"
VERSION=${GITVERSION#v}
# Folder name inside the tarball should be "encfs-1.2.3"
PREFIX="encfs-$VERSION"

# Actually create archive
git archive --prefix "$PREFIX/" -o $PREFIX.tar.gz HEAD

0 comments on commit 5c9d739

Please sign in to comment.