mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
work around svnversion not working inside git-managed tree
This commit is contained in:
parent
5fc86dbe3a
commit
f896e86693
1 changed files with 10 additions and 1 deletions
|
@ -3,11 +3,20 @@
|
|||
cd $(dirname $0)
|
||||
cd ../../
|
||||
|
||||
SVNVERSION=$(svnversion)
|
||||
if [ -z "$SVNVERSION" -o "$SVNVERSION" = "exported" ]; then
|
||||
SVNVERSION=$(git svn find-rev $(git log -1 --pretty=format:%H 2>/dev/null) \
|
||||
2>/dev/null)
|
||||
if git status | grep -q modified; then
|
||||
SVNVERSION=${SVNVERSION}M
|
||||
fi
|
||||
fi
|
||||
|
||||
cat <<EOF > android/XWords4/src/org/eehouse/android/xw4/SvnVersion.java
|
||||
// auto-generated; do not edit
|
||||
package org.eehouse.android.xw4;
|
||||
class SvnVersion {
|
||||
public static final String VERS = "$(svnversion .)";
|
||||
public static final String VERS = "$SVNVERSION";
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue