File tree 3 files changed +33
-13
lines changed
3 files changed +33
-13
lines changed Original file line number Diff line number Diff line change @@ -2,3 +2,5 @@ graft archivebox
2
2
global-exclude .DS_Store
3
3
global-exclude __pycache__
4
4
global-exclude *.pyc
5
+
6
+ prune tests/
Original file line number Diff line number Diff line change 28
28
29
29
VERSION=" $( jq -r ' .version' < " $REPO_DIR /package.json" ) "
30
30
DEBIAN_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
39
32
40
33
41
34
# cleanup build artifacts
42
35
rm -Rf build deb_dist dist archivebox-* .tar.gz
43
36
44
- # make sure the stdeb.cfg file is up-to-date with all the dependencies
45
37
46
38
# build source and binary packages
47
39
python3 setup.py --command-packages=stdeb.command \
48
40
sdist_dsc --debian-version=$DEBIAN_VERSION \
49
41
bdist_deb
50
42
51
- # sign the build with your PGP key ID
52
- debsign -k " $PGP_KEY_ID " " deb_dist/archivebox_${VERSION} -${DEBIAN_VERSION} _source.changes"
53
-
54
43
# push the build to launchpad ppa
55
44
# 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
10
10
set -o pipefail
11
11
IFS=$' \n '
12
12
13
+ PGP_KEY_ID=" ${PGP_KEY_ID:- 7D5695D3B618872647861D51C38137A7C1675988} "
14
+
15
+
13
16
REPO_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && cd .. && pwd ) "
14
17
VERSION=" $( jq -r ' .version' < " $REPO_DIR /package.json" ) "
15
- SHORT_VERSION=" $( echo " $VERSION " | perl -pe ' s/(\d+)\.(\d+)\.(\d+)/$1.$2/g' ) "
16
18
cd " $REPO_DIR "
17
19
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
+
18
47
19
48
echo " [^] Uploading to launchpad.net"
20
49
dput archivebox " deb_dist/archivebox_${VERSION} -1_source.changes"
You can’t perform that action at this time.
0 commit comments