File tree Expand file tree Collapse file tree 3 files changed +33
-13
lines changed
Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,5 @@ graft archivebox
22global-exclude .DS_Store
33global-exclude __pycache__
44global-exclude *.pyc
5+
6+ prune tests/
Original file line number Diff line number Diff line change 2828
2929VERSION=" $( jq -r ' .version' < " $REPO_DIR /package.json" ) "
3030DEBIAN_VERSION=" 1"
31- PGP_KEY_ID=" 7D5695D3B618872647861D51C38137A7C1675988"
32- # make sure you have this in ~/.dput.cf:
33- # [archivebox-ppa]
34- # fqdn: ppa.launchpad.net
35- # method: ftp
36- # incoming: ~archivebox/ubuntu/archivebox/
37- # login: anonymous
38- # allow_unsigned_uploads: 0
31+ # make sure the stdeb.cfg file is up-to-date with all the dependencies
3932
4033
4134# cleanup build artifacts
4235rm -Rf build deb_dist dist archivebox-* .tar.gz
4336
44- # make sure the stdeb.cfg file is up-to-date with all the dependencies
4537
4638# build source and binary packages
4739python3 setup.py --command-packages=stdeb.command \
4840 sdist_dsc --debian-version=$DEBIAN_VERSION \
4941 bdist_deb
5042
51- # sign the build with your PGP key ID
52- debsign -k " $PGP_KEY_ID " " deb_dist/archivebox_${VERSION} -${DEBIAN_VERSION} _source.changes"
53-
5443# push the build to launchpad ppa
5544# dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
Original file line number Diff line number Diff line change @@ -10,11 +10,40 @@ set -o nounset
1010set -o pipefail
1111IFS=$' \n '
1212
13+ PGP_KEY_ID=" ${PGP_KEY_ID:- 7D5695D3B618872647861D51C38137A7C1675988} "
14+
15+
1316REPO_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && cd .. && pwd ) "
1417VERSION=" $( jq -r ' .version' < " $REPO_DIR /package.json" ) "
15- SHORT_VERSION=" $( echo " $VERSION " | perl -pe ' s/(\d+)\.(\d+)\.(\d+)/$1.$2/g' ) "
1618cd " $REPO_DIR "
1719
20+ CURRENT_PLAFORM=" $( uname) "
21+ REQUIRED_PLATFORM=" Linux"
22+ if [[ " $CURRENT_PLAFORM " != " $REQUIRED_PLATFORM " ]]; then
23+ echo " [!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM )."
24+ exit 0
25+ fi
26+
27+
28+ [[ " $PGP_PUBLIC_KEY " ]] && echo " $PGP_PUBLIC_KEY " > /tmp/archivebox_gpg.key.pub
29+ [[ " $PGP_PRIVATE_KEY " ]] && echo " $PGP_PRIVATE_KEY " > /tmp/archivebox_gpg.key
30+
31+ echo " [+] Loading PGP keys from env vars and filesystem..."
32+ gpg --import /tmp/archivebox_gpg.key.pub || true
33+ gpg --import --allow-secret-key-import /tmp/archivebox_gpg.key || true
34+
35+
36+ echo " [*] Signing build and changelog with PGP..."
37+ debsign -k " $PGP_KEY_ID " " deb_dist/archivebox_${VERSION} -${DEBIAN_VERSION} _source.changes"
38+
39+ # make sure you have this in ~/.dput.cf:
40+ # [archivebox-ppa]
41+ # fqdn: ppa.launchpad.net
42+ # method: ftp
43+ # incoming: ~archivebox/ubuntu/archivebox/
44+ # login: anonymous
45+ # allow_unsigned_uploads: 0
46+
1847
1948echo " [^] Uploading to launchpad.net"
2049dput archivebox " deb_dist/archivebox_${VERSION} -1_source.changes"
You can’t perform that action at this time.
0 commit comments