Changeset 4653242 for git-version.sh


Ignore:
Timestamp:
01/25/2023 02:12:13 AM (15 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18, xry111/xf86-video-removal
Children:
e3047fd
Parents:
05d5b11
Message:

git-version: Don't dump revision if no "important files" are changed

If an important file is changed, we regenerate version.ent and so bump
the revision. Otherwise, version.ent may be kept. Hack git-version.sh
so we can ensure version.ent is really not changed.

Add Makefile itself and git-version.sh into the important file list as
they can definitely affect book rendering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • git-version.sh

    r05d5b11 r4653242  
    1111    exit 1
    1212fi
     13
     14shift 1
    1315
    1416echo "<!ENTITY % sysv    \"$SYSV\">"     >  conditional.ent
     
    2830export TZ=America/Chicago
    2931
    30 commit_date=$(git show -s --format=format:"%cd" --date=local)
     32sha=$(git log -s --format=format:"%H" --date=local -1 $*)
     33commit_date=$(git log -s --format=format:"%cd" --date=local -1 $*)
    3134short_date=$(date --date "$commit_date" "+%Y-%m-%d")
    3235
     
    4548full_date="$month $day$suffix, $year"
    4649
    47 sha="$(git describe --abbrev=1)"
     50sha="$(git describe --abbrev=1 $sha)"
    4851version=$(echo "$sha" | sed 's/-g[^-]*$//')
    49 
    50 if [ "$(git diff HEAD | wc -l)" != "0" ]; then
    51     version="$version+"
    52 fi
    5352
    5453echo "<!ENTITY year              \"$year\">"               >  version.ent
Note: See TracChangeset for help on using the changeset viewer.