-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME-maintainer
46 lines (34 loc) · 1.62 KB
/
README-maintainer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
See also "External Libraries" in TODO in qpdf/qpdf.
RELEASE CREATION
Check the most successful build at
https://github.com/qpdf/external-libs/actions
Look at the summary of the most recent build to find the overall
version. This can also be found the end of the output of the `Setup`
step of the `Setup` Job to get the overall version.
If any component is newer than the last time, proceed. Otherwise, no
action is required.
Download and extract a distribution artifact from a successful run.
This contains qpdf-external-libs-{bin,src}.zip. Copy those into
Q/storage/releases/qpdf/external-libs/yyyy-mm-dd.
Get the value of overall_version from external-libs-src/versions in
the qpdf-external-libs-src.zip file. You can just source the file.
date=$(date +%Y-%m-%d)
git tag -s release-$date @ -m"$date: $overall_version"
git push qpdf release-$date
GITHUB_TOKEN=$(qdata-show cred github-token)
function gcurl() { curl -H "Authorization: token $GITHUB_TOKEN" ${1+"$@"}; }
url=$(gcurl -s -XPOST https://api.github.com/repos/qpdf/external-libs/releases -d'{"tag_name": "release-'$date'", "name": "'$date': '$overall_version'", "draft": true}' | jq -r '.url')
upload_url=$(gcurl -s $url | jq -r '.upload_url' | sed -E -e 's/\{.*\}//')
From the release storage area:
\rm -f *.sha256
files=(*)
sha256sum ${files[*]} >| qpdf-external-libs.sha256
gpg --clearsign --armor qpdf-external-libs.sha256
mv qpdf-external-libs.sha256.asc qpdf-external-libs.sha256
chmod 444 *
for i in *; do
mime=$(file -b --mime-type $i)
gcurl -H "Content-Type: $mime" --data-binary @$i "$upload_url?name=$i"
done
To finalize the release:
gcurl -XPOST $url -d'{"draft": false}'