]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
abicheck.sh: implement --refresh-if option as documented.
authorDan Kegel <dank@kegel.com>
Fri, 1 Apr 2022 19:38:36 +0000 (19:38 +0000)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 4 Apr 2022 07:25:01 +0000 (09:25 +0200)
Also change exit status to nonzero if there is no abifile and --refresh or --refresh-if were not specified.

.github/workflows/pkgcheck.yml
test/abicheck.md
test/abicheck.sh

index 41daf5f309ec522a85d512e7fc9513b9b751c54f..1c4b1dcbbae6b8b465c431fa5865771bc409ff5c 100644 (file)
@@ -128,7 +128,7 @@ jobs:
       # macOS runner does not contain abigail
       if: runner.os != 'macOS'
       run: |
-        sh test/abicheck.sh --refresh_if
+        sh test/abicheck.sh --refresh-if
       env:
         CC: ${{ matrix.compiler }}
         CXX: ${{ matrix.cxx-compiler }}
@@ -143,7 +143,7 @@ jobs:
       # macOS runner does not contain abigail
       if: runner.os != 'macOS'
       run: |
-        sh test/abicheck.sh --zlib-compat --refresh_if
+        sh test/abicheck.sh --zlib-compat --refresh-if
       env:
         CC: ${{ matrix.compiler }}
         CXX: ${{ matrix.cxx-compiler }}
index 3e291264ad717189c225291277fd7d9654ec989c..57337f5882db8250a5af91d91baf6818656730af 100644 (file)
@@ -29,7 +29,7 @@ means someone has to check out and build
 the previous source tree and extract its .abi
 using abidw.  This can be slow.
 
-If you don't mind the slowness, run abicheck.sh --refresh_if,
+If you don't mind the slowness, run abicheck.sh --refresh-if,
 and it will download and build the reference version
 and extract the .abi on the spot if needed.
 (FIXME: should this be the default?)
index 89199a59abe4af1e53fde1a088b4004c1ff74297..5c142556b3aff4548f4c584bf58e7332cf068beb 100755 (executable)
@@ -49,7 +49,7 @@ do
   --refresh)
     refresh=true
     ;;
-  --refresh_if)
+  --refresh-if)
     refresh_if=true
     ;;
   --help)
@@ -134,12 +134,10 @@ then
   # caching abi files in git (but that would slow builds down).
 fi
 
-if test -f "$ABIFILE"
+if test -f "$ABIFILE"
 then
-  ABIFILE="$ABIFILE"
-else
-  echo "abicheck: SKIP: $ABIFILE not found; rerun with --refresh or --refresh_if"
-  exit 0
+  echo "abicheck: SKIP: $ABIFILE not found; rerun with --refresh or --refresh-if"
+  exit 1
 fi
 
 # Build unstripped, uninstalled, very debug shared library