Skip to content

Commit

Permalink
Add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
wingo committed Jul 3, 2017
1 parent 34a94bd commit c6a51cf
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions generate-version-lua.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

set -e
cd $(dirname $0)

if test -z "$VERSION"; then
VERSION=`cat .version`;
fi

if test -z "$EXTRAVERSION" -a -d .git; then
EXTRAVERSION=`git describe --dirty --tags --always --match="v$VERSION"`
if test "$EXTRAVERSION" = "v$VERSION"; then
EXTRAVERSION=
else
EXTRAVERSION=`echo "$EXTRAVERSION" | sed -e "s/^v$VERSION-//"`
fi
fi

cat <<EOF
-- This file is automatically generated.
module(..., package.seeall);
version = '$VERSION'
extra_version = '$EXTRAVERSION'
EOF

0 comments on commit c6a51cf

Please sign in to comment.