Skip to content

Commit

Permalink
Change: version determining
Browse files Browse the repository at this point in the history
  • Loading branch information
telk5093 committed Mar 3, 2024
1 parent a063c9a commit bbf3c64
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Empty file removed .rev
Empty file.
10 changes: 5 additions & 5 deletions findversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ ROOT_DIR=`pwd`
# Determine if we are using modified version
MODIFIED="0"

# If there is .rev file
if [ -f "$ROOT_DIR/.rev" ]; then
VERSION=`cat $ROOT_DIR/.rev`

# If there is .git directory
if [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then
elif [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then
# Refresh the index to make sure file stat info is in sync, then look for modifications
git update-index --refresh >/dev/null

Expand All @@ -31,10 +35,6 @@ if [ -d "$ROOT_DIR/.git" ] || [ -f "$ROOT_DIR/.git" ]; then
VERSION="$ISODATE-$BRANCH-$SHORTHASH"
fi

# If there is .rev file
elif [ -f "$ROOT_DIR/.rev" ]; then
VERSION=`cat $ROOT_DIR/.rev`

# Or, we don't know
else
VERSION=`date +"%Y%m%d"`
Expand Down

0 comments on commit bbf3c64

Please sign in to comment.