mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-21 19:53:06 +00:00
remove apt and brew build scripts
This commit is contained in:
parent
943a1247df
commit
171fbe4cf2
9 changed files with 8 additions and 224 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -1,10 +1,6 @@
|
||||||
[submodule "docs"]
|
[submodule "docs"]
|
||||||
path = docs
|
path = docs
|
||||||
url = https://github.com/ArchiveBox/ArchiveBox.wiki.git
|
url = https://github.com/ArchiveBox/ArchiveBox.wiki.git
|
||||||
|
|
||||||
[submodule "brew_dist"]
|
|
||||||
path = brew_dist
|
|
||||||
url = https://github.com/ArchiveBox/homebrew-archivebox.git
|
|
||||||
[submodule "pip_dist"]
|
[submodule "pip_dist"]
|
||||||
path = pip_dist
|
path = pip_dist
|
||||||
url = https://github.com/ArchiveBox/pip-archivebox.git
|
url = https://github.com/ArchiveBox/pip-archivebox.git
|
||||||
|
|
|
@ -19,8 +19,6 @@ cd "$REPO_DIR"
|
||||||
# the order matters
|
# the order matters
|
||||||
./bin/build_docs.sh
|
./bin/build_docs.sh
|
||||||
./bin/build_pip.sh
|
./bin/build_pip.sh
|
||||||
./bin/build_deb.sh
|
|
||||||
./bin/build_brew.sh
|
|
||||||
./bin/build_docker.sh
|
./bin/build_docker.sh
|
||||||
|
|
||||||
echo "[√] Done. Install the built package by running:"
|
echo "[√] Done. Install the built package by running:"
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
### Bash Environment Setup
|
|
||||||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
||||||
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
|
||||||
# set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o errtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
IFS=$'\n'
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null 2>&1 && cd .. && pwd )"
|
|
||||||
|
|
||||||
|
|
||||||
CURRENT_PLAFORM="$(uname)"
|
|
||||||
REQUIRED_PLATFORM="Darwin"
|
|
||||||
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
|
||||||
echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
cd "$REPO_DIR/brew_dist"
|
|
||||||
# make sure archivebox.rb is up-to-date with the dependencies
|
|
||||||
git pull
|
|
||||||
git status | grep 'up to date'
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "[+] Uninstalling any exisitng archivebox versions..."
|
|
||||||
brew uninstall archivebox || true
|
|
||||||
brew untap archivebox/archivebox || true
|
|
||||||
brew uninstall --ignore-dependencies yt-dlp || true
|
|
||||||
brew uninstall python-mutagen || true
|
|
||||||
brew uninstall python-brotli || true
|
|
||||||
|
|
||||||
pip3 uninstall archivebox || true
|
|
||||||
pip3 uninstall mutagen || true
|
|
||||||
pip3 uninstall brotli || true
|
|
||||||
pip3 uninstall yt-dlp || true
|
|
||||||
|
|
||||||
# echo "[*] Running Formula linters and test build..."
|
|
||||||
# brew test-bot --tap=ArchiveBox/homebrew-archivebox archivebox/archivebox/archivebox || true
|
|
||||||
# brew uninstall archivebox || true
|
|
||||||
# brew untap archivebox/archivebox || true
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "[+] Installing and building hombrew bottle from https://github.com/ArchiveBox/homebrew-archivebox#main"
|
|
||||||
brew tap archivebox/archivebox
|
|
||||||
brew install --build-bottle archivebox
|
|
||||||
brew bottle archivebox
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "[√] Finished. Make sure to commit the outputted .tar.gz and bottle files!"
|
|
|
@ -1,58 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
### Bash Environment Setup
|
|
||||||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
||||||
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
|
||||||
# set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o errtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
IFS=$'\n'
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
|
||||||
DEBIAN_VERSION="${DEBIAN_VERSION:-1}"
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -f "$REPO_DIR/.venv/bin/activate" ]]; then
|
|
||||||
source "$REPO_DIR/.venv/bin/activate"
|
|
||||||
else
|
|
||||||
echo "[!] Warning: No virtualenv presesnt in $REPO_DIR.venv"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Build python package lists
|
|
||||||
# https://pdm-project.org/latest/usage/lockfile/
|
|
||||||
echo "[+] Generating requirements.txt and pdm.lock from pyproject.toml..."
|
|
||||||
pdm lock --group=':all' --production --lockfile pdm.lock --strategy="cross_platform"
|
|
||||||
pdm sync --group=':all' --production --lockfile pdm.lock --clean || pdm sync --group=':all' --production --lockfile pdm.lock --clean
|
|
||||||
pdm export --group=':all' --production --lockfile pdm.lock --without-hashes -o requirements.txt
|
|
||||||
|
|
||||||
pdm lock --group=':all' --dev --lockfile pdm.dev.lock --strategy="cross_platform"
|
|
||||||
pdm sync --group=':all' --dev --lockfile pdm.dev.lock --clean || pdm sync --group=':all' --dev --lockfile pdm.dev.lock --clean
|
|
||||||
pdm export --group=':all' --dev --lockfile pdm.dev.lock --without-hashes -o requirements-dev.txt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# cleanup build artifacts
|
|
||||||
rm -Rf build deb_dist dist archivebox-*.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
# build source and binary packages
|
|
||||||
# make sure the stdeb.cfg file is up-to-date with all the dependencies
|
|
||||||
python3 setup.py --command-packages=stdeb.command \
|
|
||||||
sdist_dsc --debian-version=$DEBIAN_VERSION \
|
|
||||||
bdist_deb
|
|
||||||
|
|
||||||
# should output deb_dist/archivebox_0.5.4-1.{deb,changes,buildinfo,tar.gz}
|
|
|
@ -18,20 +18,16 @@ cd "$REPO_DIR"
|
||||||
# ./bin/lint.sh
|
# ./bin/lint.sh
|
||||||
# ./bin/test.sh
|
# ./bin/test.sh
|
||||||
|
|
||||||
# Run all the build scripts
|
# # Run all the build scripts
|
||||||
./bin/build_git.sh
|
# ./bin/build_git.sh
|
||||||
./bin/build_docs.sh
|
# ./bin/build_docs.sh
|
||||||
./bin/build_pip.sh
|
# ./bin/build_pip.sh
|
||||||
./bin/build_deb.sh
|
# ./bin/build_docker.sh
|
||||||
./bin/build_brew.sh
|
|
||||||
./bin/build_docker.sh
|
|
||||||
|
|
||||||
# Push relase to public repositories
|
# Push relase to public repositories
|
||||||
./bin/release_git.sh
|
./bin/release_git.sh
|
||||||
./bin/release_docs.sh
|
./bin/release_docs.sh
|
||||||
./bin/release_pip.sh
|
./bin/release_pip.sh
|
||||||
./bin/release_deb.sh
|
|
||||||
./bin/release_brew.sh
|
|
||||||
./bin/release_docker.sh
|
./bin/release_docker.sh
|
||||||
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
### Bash Environment Setup
|
|
||||||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
||||||
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
|
||||||
# set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o errtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
IFS=$'\n'
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
|
||||||
|
|
||||||
|
|
||||||
CURRENT_PLAFORM="$(uname)"
|
|
||||||
REQUIRED_PLATFORM="Darwin"
|
|
||||||
if [[ "$CURRENT_PLAFORM" != "$REQUIRED_PLATFORM" ]]; then
|
|
||||||
echo "[!] Skipping the Homebrew package build on $CURRENT_PLAFORM (it can only be run on $REQUIRED_PLATFORM)."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
|
|
||||||
./bin/build_brew.sh
|
|
||||||
|
|
||||||
git add '*.bottle.tar.gz'
|
|
||||||
git commit -m "add new release bottle"
|
|
||||||
git pull
|
|
||||||
git push
|
|
|
@ -1,50 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
### Bash Environment Setup
|
|
||||||
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
|
|
||||||
# https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
|
|
||||||
# set -o xtrace
|
|
||||||
set -o errexit
|
|
||||||
set -o errtrace
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
IFS=$'\n'
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
|
|
||||||
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
|
|
||||||
DEBIAN_VERSION="${DEBIAN_VERSION:-1}"
|
|
||||||
cd "$REPO_DIR"
|
|
||||||
|
|
||||||
|
|
||||||
echo "[+] Loading PGP keys from env vars and filesystem..."
|
|
||||||
# https://github.com/ArchiveBox/debian-archivebox/settings/secrets/actions
|
|
||||||
PGP_KEY_ID="${PGP_KEY_ID:-BC2D21B0D84E16C437300B8652423FBED1586F45}"
|
|
||||||
[[ "${PGP_PUBLIC_KEY:-}" ]] && echo "$PGP_PUBLIC_KEY" > /tmp/archivebox_gpg.key.pub
|
|
||||||
[[ "${PGP_PRIVATE_KEY:-}" ]] && echo "$PGP_PRIVATE_KEY" > /tmp/archivebox_gpg.key
|
|
||||||
gpg --import /tmp/archivebox_gpg.key.pub || true
|
|
||||||
gpg --import --allow-secret-key-import /tmp/archivebox_gpg.key || true
|
|
||||||
echo "$PGP_KEY_ID:6:" | gpg --import-ownertrust || true
|
|
||||||
|
|
||||||
echo "[*] Signing build and changelog with PGP..."
|
|
||||||
debsign --re-sign -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 -f archivebox "deb_dist/archivebox_${VERSION}-${DEBIAN_VERSION}_source.changes"
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit ec64946796d46a31e5a4d6449908b4060edb3079
|
|
|
@ -36,13 +36,8 @@ classifiers = [
|
||||||
"Topic :: Utilities",
|
"Topic :: Utilities",
|
||||||
"Typing :: Typed",
|
"Typing :: Typed",
|
||||||
]
|
]
|
||||||
# platform = "py3-none-any"
|
|
||||||
# package = "archivebox"
|
|
||||||
|
|
||||||
|
|
||||||
# pdm install
|
|
||||||
# pdm update --unconstrained
|
|
||||||
# Last Bumped: 2024-09-18
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
############# Django / Core Libraries #############
|
############# Django / Core Libraries #############
|
||||||
"setuptools>=74.1.0",
|
"setuptools>=74.1.0",
|
||||||
|
@ -91,9 +86,6 @@ dependencies = [
|
||||||
#################################################
|
#################################################
|
||||||
]
|
]
|
||||||
|
|
||||||
# pdm lock --group=':all'
|
|
||||||
# pdm install -G:all
|
|
||||||
# pdm update --group=':all' --unconstrained
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
sonic = [
|
sonic = [
|
||||||
# echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_sonic.list
|
# echo "deb [signed-by=/usr/share/keyrings/valeriansaliou_sonic.gpg] https://packagecloud.io/valeriansaliou/sonic/debian/ bookworm main" > /etc/apt/sources.list.d/valeriansaliou_sonic.list
|
||||||
|
@ -113,7 +105,7 @@ all = [
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
dev-dependencies = [
|
dev-dependencies = [
|
||||||
### BUILD
|
### BUILD
|
||||||
# "pdm", # usually installed by apt/brew, dont double-install with pip
|
"uv",
|
||||||
"pip>=24.2",
|
"pip>=24.2",
|
||||||
"setuptools>=75.1.0",
|
"setuptools>=75.1.0",
|
||||||
"wheel>=0.44.0",
|
"wheel>=0.44.0",
|
||||||
|
@ -146,6 +138,7 @@ dev-dependencies = [
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["pdm-backend"]
|
requires = ["pdm-backend"]
|
||||||
build-backend = "pdm.backend"
|
build-backend = "pdm.backend"
|
||||||
|
# https://github.com/astral-sh/uv/issues/3957
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.setuptools]
|
||||||
packages = ["archivebox"]
|
packages = ["archivebox"]
|
||||||
|
@ -173,7 +166,7 @@ explicit_package_bases = true
|
||||||
# disallow_incomplete_defs = true
|
# disallow_incomplete_defs = true
|
||||||
# disallow_untyped_defs = true
|
# disallow_untyped_defs = true
|
||||||
# disallow_untyped_decorators = true
|
# disallow_untyped_decorators = true
|
||||||
# exclude = "pdm/(pep582/|models/in_process/.+\\.py)"
|
# exclude = "tests/.*"
|
||||||
plugins = ["mypy_django_plugin.main"]
|
plugins = ["mypy_django_plugin.main"]
|
||||||
|
|
||||||
[tool.django-stubs]
|
[tool.django-stubs]
|
||||||
|
@ -203,12 +196,6 @@ pythonVersion = "3.10"
|
||||||
pythonPlatform = "Linux"
|
pythonPlatform = "Linux"
|
||||||
|
|
||||||
|
|
||||||
[tool.pdm.scripts]
|
|
||||||
lint = "./bin/lint.sh"
|
|
||||||
test = "./bin/test.sh"
|
|
||||||
# all = {composite = ["lint mypackage/", "test -v tests/"]}
|
|
||||||
|
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
archivebox = "archivebox.cli:main"
|
archivebox = "archivebox.cli:main"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue