Skip to content

Commit

Permalink
GEN-VERSION-FILE: Refactoring: Switch to Bash to use ${parameter//pat…
Browse files Browse the repository at this point in the history
…tern/string} instead of sed
  • Loading branch information
inkarkat committed Dec 26, 2024
1 parent fd6bab4 commit 1a938c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GEN-VERSION-FILE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env bash
# Based on git's GIT-VERSION-GEN.

VF=VERSION-FILE
Expand All @@ -7,7 +7,7 @@ DEF_VER=v0.0
if test -d .git -o -f .git &&
VN=$(git describe --dirty --tags 2>/dev/null)
then
VN=$(echo "$VN" | sed -e 's/-/./g');
VN=${VN//-/.}
else
VN="$DEF_VER"
fi
Expand Down

0 comments on commit 1a938c7

Please sign in to comment.