1
0
Fork 0

bump version to 0.7.1 and fix version autodetection code

This commit is contained in:
Nick Sweeting 2023-11-03 20:07:39 -07:00
parent 907d170614
commit 7377d9ebc3
10 changed files with 27 additions and 35 deletions

View file

@ -1,6 +0,0 @@
graft archivebox
global-exclude .DS_Store
global-exclude __pycache__
global-exclude *.pyc
prune tests/

12
Pipfile
View file

@ -1,12 +0,0 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[packages]
# see setup.py for package dependency list
"e1839a8" = {path = ".", editable = true}
[dev-packages]
# see setup.py for dev package dependency list
"e1839a8" = {path = ".", extras = ["dev"], editable = true}

View file

@ -40,6 +40,7 @@ from typing import Optional, Type, Tuple, Dict, Union, List
from subprocess import run, PIPE, DEVNULL from subprocess import run, PIPE, DEVNULL
from configparser import ConfigParser from configparser import ConfigParser
from collections import defaultdict from collections import defaultdict
import importlib.metadata
from .config_stubs import ( from .config_stubs import (
SimpleConfigValueDict, SimpleConfigValueDict,
@ -374,7 +375,7 @@ ALLOWED_IN_OUTPUT_DIR = {
} }
def get_version(config): def get_version(config):
return json.loads((Path(config['PACKAGE_DIR']) / 'package.json').read_text(encoding='utf-8').strip())['version'] return importlib.metadata.version(__package__ or 'archivebox')
def get_commit_hash(config): def get_commit_hash(config):
try: try:

View file

@ -1 +0,0 @@
../package.json

13
archivebox/package.json Normal file
View file

@ -0,0 +1,13 @@
{
"name": "archivebox",
"version": "0.7.0",
"description": "ArchiveBox: The self-hosted internet archive",
"author": "Nick Sweeting <archivebox-npm@sweeting.me>",
"repository": "github:ArchiveBox/ArchiveBox",
"license": "MIT",
"dependencies": {
"@postlight/parser": "^2.2.3",
"readability-extractor": "git+https://github.com/ArchiveBox/readability-extractor.git",
"single-file-cli": "^1.1.12"
}
}

View file

@ -25,6 +25,9 @@ cd "$REPO_DIR"
rm -Rf build dist rm -Rf build dist
echo "[+] Building sdist, bdist_wheel, and egg_info" echo "[+] Building sdist, bdist_wheel, and egg_info"
rm -f archivebox/package.json
cp package.json archivebox/package.json
pdm self update pdm self update
pdm install pdm install
pdm build pdm build

View file

@ -11,17 +11,11 @@ set -o pipefail
IFS=$'\n' IFS=$'\n'
REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )"
VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")"
cd "$REPO_DIR" cd "$REPO_DIR"
source "$REPO_DIR/.venv/bin/activate" source "$REPO_DIR/.venv/bin/activate"
echo "[^] Publishing to Test PyPI..."
pdm publish --repository testpypi
# apt install python3 python3-all python3-dev echo "[^] Publishing to PyPI..."
# pip install '.[dev]' pdm publish --no-build
echo "[^] Uploading to test.pypi.org"
python3 -m twine upload --repository testpypi pip_dist/archivebox-${VERSION}*.{whl,tar.gz}
echo "[^] Uploading to pypi.org"
python3 -m twine upload --repository pypi pip_dist/archivebox-${VERSION}*.{whl,tar.gz}

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "archivebox", "name": "archivebox",
"version": "0.7.0", "version": "0.7.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "archivebox", "name": "archivebox",
"version": "0.7.0", "version": "0.7.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@postlight/parser": "^2.2.3", "@postlight/parser": "^2.2.3",

View file

@ -1,6 +1,6 @@
{ {
"name": "archivebox", "name": "archivebox",
"version": "0.7.0", "version": "0.7.1",
"description": "ArchiveBox: The self-hosted internet archive", "description": "ArchiveBox: The self-hosted internet archive",
"author": "Nick Sweeting <archivebox-npm@sweeting.me>", "author": "Nick Sweeting <archivebox-npm@sweeting.me>",
"repository": "github:ArchiveBox/ArchiveBox", "repository": "github:ArchiveBox/ArchiveBox",

View file

@ -1,6 +1,6 @@
[project] [project]
name = "archivebox" name = "archivebox"
version = "0.7.0" version = "0.7.1"
description = "Self-hosted internet archiving solution." description = "Self-hosted internet archiving solution."
authors = [ authors = [
{name = "Nick Sweeting", email = "setup.py@archivebox.io"}, {name = "Nick Sweeting", email = "setup.py@archivebox.io"},

View file

@ -5,7 +5,7 @@ Package3: archivebox
Suite: focal Suite: focal
Suite3: focal Suite3: focal
Build-Depends: debhelper, dh-python, python3-all, python3-pip, python3-setuptools, python3-wheel, python3-stdeb Build-Depends: debhelper, dh-python, python3-all, python3-pip, python3-setuptools, python3-wheel, python3-stdeb
Depends3: nodejs, wget, curl, git, ffmpeg, yt-dlp, python3-all, python3-pip, python3-setuptools, python3-croniter, python3-crontab, python3-dateparser, python3-django, python3-django-extensions, python3-django-jsonfield, python3-mypy-extensions, python3-requests, python3-w3lib, ripgrep Depends3: nodejs, wget, curl, git, ffmpeg, yt-dlp, ripgrep, python3-all, python3-pip, python3-setuptools, python3-croniter, python3-crontab, python3-dateparser, python3-django, python3-django-extensions, python3-django-jsonfield, python3-mypy-extensions, python3-requests, python3-w3lib
X-Python3-Version: >= 3.9 X-Python3-Version: >= 3.9
XS-Python-Version: >= 3.9 XS-Python-Version: >= 3.9
Setup-Env-Vars: DEB_BUILD_OPTIONS=nocheck Setup-Env-Vars: DEB_BUILD_OPTIONS=nocheck