mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 02:49:00 +00:00
Check generated QPDFJob files in CI
This is to catch pull requests that make changes that would affect automatically generated job files without including those modifications.
This commit is contained in:
parent
cb769c62e5
commit
511d70166d
@ -1,4 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
cd $(dirname $0)/..
|
||||
if ! ./generate_auto_job --check; then
|
||||
cat 1>&2 <<EOF
|
||||
|
||||
******************************
|
||||
|
||||
An input or output file of generate_auto_job was modified without
|
||||
rerunning ./generate_auto_job. If you are seeing this in your pull
|
||||
request, you should pass --enable-maintainer-mode to ./configure if
|
||||
possible, or if not, run "./generate_auto_job --generate" and include
|
||||
any changed files in your commit.
|
||||
|
||||
******************************
|
||||
|
||||
EOF
|
||||
exit 2
|
||||
fi
|
||||
build-scripts/build-doc
|
||||
build-scripts/download-external-libs
|
||||
|
@ -247,6 +247,21 @@ class Main:
|
||||
if m:
|
||||
old_hashes[m.group(1)] = m.group(2)
|
||||
match = old_hashes == hashes
|
||||
if not match:
|
||||
# Write to stdout, not stderr. What we write to stderr
|
||||
# is visible in a normal build. Writing to stdout will
|
||||
# hide it in that case but expose it if you directly
|
||||
# run ./generate_auto_job --check as in CI.
|
||||
print(f'*** {whoami} hash mismatches ***')
|
||||
match = False
|
||||
for k, v in hashes.items():
|
||||
if k not in old_hashes:
|
||||
print(f' {k} is not in job.sums')
|
||||
elif v != old_hashes[k]:
|
||||
print(f' {k} was modified')
|
||||
for k in old_hashes:
|
||||
if k not in hashes:
|
||||
print(f' {k} disappeared')
|
||||
except Exception:
|
||||
pass
|
||||
return match
|
||||
|
2
job.sums
2
job.sums
@ -1,5 +1,5 @@
|
||||
# Generated by generate_auto_job
|
||||
generate_auto_job 751021df2a7f03c5d9a6a0ae07277004a89b9b20fa951fa4097212c72fc982a9
|
||||
generate_auto_job 464f660527880d5213ada3f5be5bdab05a425610044dbe0a2a918bc1e268726a
|
||||
include/qpdf/auto_job_c_att.hh 1f5d589ccf6684b09a203da261c31fc90a866e6eefe906b673e2d6d5a08ef753
|
||||
include/qpdf/auto_job_c_copy_att.hh 65bdce5382a60f1815214297cf005072f17556ec4a15317b600f9ecc9cb89ea4
|
||||
include/qpdf/auto_job_c_enc.hh 37ca99a124a34bb613f154c6c8934761bd7e7cc5a2719798ccec7edf05b4aeb9
|
||||
|
Loading…
Reference in New Issue
Block a user