mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
move debsign to release not build
This commit is contained in:
parent
08161a526b
commit
66fb5b278a
3 changed files with 33 additions and 13 deletions
|
@ -2,3 +2,5 @@ graft archivebox
|
|||
global-exclude .DS_Store
|
||||
global-exclude __pycache__
|
||||
global-exclude *.pyc
|
||||
|
||||
prune tests/
|
||||
|
|
|
@ -28,28 +28,17 @@ fi
|
|||
|
||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||
DEBIAN_VERSION="1"
|
||||
PGP_KEY_ID="7D5695D3B618872647861D51C38137A7C1675988"
|
||||
# make sure you have this in ~/.dput.cf:
|
||||
# [archivebox-ppa]
|
||||
# fqdn: ppa.launchpad.net
|
||||
# method: ftp
|
||||
# incoming: ~archivebox/ubuntu/archivebox/
|
||||
# login: anonymous
|
||||
# allow_unsigned_uploads: 0
|
||||
# make sure the stdeb.cfg file is up-to-date with all the dependencies
|
||||
|
||||
|
||||
# cleanup build artifacts
|
||||
rm -Rf build deb_dist dist archivebox-*.tar.gz
|
||||
|
||||
# make sure the stdeb.cfg file is up-to-date with all the dependencies
|
||||
|
||||
# build source and binary packages
|
||||
python3 setup.py --command-packages=stdeb.command \
|
||||
sdist_dsc --debian-version=$DEBIAN_VERSION \
|
||||
bdist_deb
|
||||
|
||||
# sign the build with your PGP key ID
|
||||
debsign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
||||
|
||||
# push the build to launchpad ppa
|
||||
# dput archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
||||
|
|
|
@ -10,11 +10,40 @@ set -o nounset
|
|||
set -o pipefail
|
||||
IFS=$'\n'
|
||||
|
||||
PGP_KEY_ID="${PGP_KEY_ID:-7D5695D3B618872647861D51C38137A7C1675988}"
|
||||
|
||||
|
||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||
SHORT_VERSION="$(echo "$VERSION" | perl -pe 's/(\d+)\.(\d+)\.(\d+)/$1.$2/g')"
|
||||
cd "$REPO_DIR"
|
||||
|
||||
CURRENT_PLAFORM="$(uname)"
|
||||
REQUIRED_PLATFORM="Linux"
|
||||
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
||||
echo "[!] Skipping the Debian package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
[[ "$PGP_PUBLIC_KEY" ]] && echo "$PGP_PUBLIC_KEY" > /tmp/archivebox_gpg.key.pub
|
||||
[[ "$PGP_PRIVATE_KEY" ]] && echo "$PGP_PRIVATE_KEY" > /tmp/archivebox_gpg.key
|
||||
|
||||
echo "[+] Loading PGP keys from env vars and filesystem..."
|
||||
gpg --import /tmp/archivebox_gpg.key.pub || true
|
||||
gpg --import --allow-secret-key-import /tmp/archivebox_gpg.key || true
|
||||
|
||||
|
||||
echo "[*] Signing build and changelog with PGP..."
|
||||
debsign -k "$PGP_KEY_ID" "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
||||
|
||||
# make sure you have this in ~/.dput.cf:
|
||||
# [archivebox-ppa]
|
||||
# fqdn: ppa.launchpad.net
|
||||
# method: ftp
|
||||
# incoming: ~archivebox/ubuntu/archivebox/
|
||||
# login: anonymous
|
||||
# allow_unsigned_uploads: 0
|
||||
|
||||
|
||||
echo "[^] Uploading to launchpad.net"
|
||||
dput archivebox "deb_dist/archivebox_${VERSION}-1_source.changes"
|
||||
|
|
Loading…
Reference in a new issue