File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,16 +113,11 @@ jobs:
113113 - name : Prepare version number and architecture for artifact
114114 id : libktx-version
115115 shell : bash
116- # The ktx.version file in the parent of the build directory will include
117- # the "tweak", if the package version has one. The library version though
118- # reflects the API version so does not include the tewak. Extract the
119- # version from the generated version.h file instead.
120- #
121116 # Arch set up is to match arch to names used in releases and platforms.
122117 # N.B. If `>> ${{ github.env }} is used here variables are not seen in
123118 # following step on Windows runners. Linux and macOS have no problem.
124119 run : |
125- echo KTX_VERSION=$(grep -A 1 -m 1 "Code version" lib/src/version.h | tail -n 1 ) >> $GITHUB_ENV
120+ echo KTX_VERSION=$(cat ${{ env.BUILD_DIR_TL }}/ktx.version ) >> $GITHUB_ENV
126121 arch=$(echo ${{ runner.arch }} | tr '[:upper:]' '[:lower:]')
127122 if [ "$arch" = "x64" ]; then arch=x86_64; fi
128123 echo ARCH=$arch >> $GITHUB_ENV
Original file line number Diff line number Diff line change @@ -17,12 +17,17 @@ if [[ $# -ne 2 ]]; then
1717fi
1818
1919cd $1
20- version=$2
21- if [[ $version =~ ([0-9]+).[0-9]+.[0-9]+ ]]; then
20+
21+ fullversion=$2
22+ # If the incoming version is a full (package) version that includes
23+ # a tweak, remove it. Library version reflect the API version so do
24+ # not include a tweak.
25+ if [[ $fullversion =~ (( [0 - 9 ]+ ).[0 - 9 ]+ .[0 - 9 ]+ )(- .* $)? ]]; then
2226 major=${BASH_REMATCH[1]}
23- echo " major is $major "
27+ version=${BASH_REMATCH[2]}
28+ #echo "major is $major , version is $version "
2429else
25- echo " version number must have the form major.minor.patch" .
30+ echo "version number must have the form major.minor.patch[-tweak] ".
2631 usage
2732 exit 1
2833fi
You can’t perform that action at this time.
0 commit comments