mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-12-28 01:01:50 +01:00
Update version with zero padded commit count
This commit is contained in:
parent
978a59efd5
commit
a021f6f0ce
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
run: |
|
||||
sudo timedatectl set-timezone Asia/Singapore
|
||||
echo "DATE=$(date +%y.%m)" >> $GITHUB_ENV
|
||||
echo "COUNT=$(git rev-list --count HEAD --since=$(date +%Y-%m-01))" >> $GITHUB_ENV
|
||||
echo "COUNT=$(git rev-list --count HEAD --since=$(date --date="$(date +%Y-%m-01) - 1 second" +%s) | xargs printf "%02d")" >> $GITHUB_ENV
|
||||
echo "SHA_SHORT=$(echo ${{ github.sha }} | cut -c -7)" >> $GITHUB_ENV
|
||||
echo "DATE_OLD=$(date +%Y-%m-%d)" >> $GITHUB_ENV
|
||||
|
||||
|
@ -362,9 +362,9 @@ version_check() {
|
||||
if [[ -d .git ]]; then
|
||||
git_hash=$(git rev-parse HEAD | cut -c -7)
|
||||
if [[ $platform == "macos" ]]; then
|
||||
version_current=v$(date +%y.%m).$(git rev-list --count HEAD --since=$(date -j -f "%Y-%m-%d %H:%M:%S" "$(date -v1d -v-1d +%Y-%m-%d) 23:59:59" +%s))
|
||||
version_current=v$(date +%y.%m).$(git rev-list --count HEAD --since=$(date -j -f "%Y-%m-%d %H:%M:%S" "$(date -v1d -v-1d +%Y-%m-%d) 23:59:59" +%s) | xargs printf "%02d")
|
||||
else
|
||||
version_current=v$(date +%y.%m).$(git rev-list --count HEAD --since=$(date --date="$(date +%Y-%m-01) - 1 second" +%s))
|
||||
version_current=v$(date +%y.%m).$(git rev-list --count HEAD --since=$(date --date="$(date +%Y-%m-01) - 1 second" +%s) | xargs printf "%02d")
|
||||
fi
|
||||
elif [[ -e ./resources/git_hash ]]; then
|
||||
version="$(cat ./resources/version)"
|
||||
|
Loading…
Reference in New Issue
Block a user