Fixes for releasing
This commit is contained in:
parent
c5375b180f
commit
a9d56b66c5
3 changed files with 21 additions and 11 deletions
|
|
@ -61,6 +61,23 @@ rsync -a --delete \
|
||||||
"${SRC}/" "${WORK}/"
|
"${SRC}/" "${WORK}/"
|
||||||
|
|
||||||
cd "${WORK}"
|
cd "${WORK}"
|
||||||
|
|
||||||
|
# This project's pyproject.toml uses the PEP 621 [project] table, which needs
|
||||||
|
# poetry-core >= 2.0. Debian bookworm and Ubuntu jammy/noble ship an older
|
||||||
|
# poetry-core that cannot parse it. On those, swap in the legacy Poetry 1.x
|
||||||
|
# formatted metadata (kept in sync at pyproject.poetry1.toml) for the build.
|
||||||
|
# trixie and newer ship poetry-core 2.x and keep the PEP 621 file.
|
||||||
|
if [ -f pyproject.poetry1.toml ]; then
|
||||||
|
core_ver="$(python3 -c 'import poetry.core as c; print(c.__version__)' 2>/dev/null || echo 0)"
|
||||||
|
core_major="${core_ver%%.*}"
|
||||||
|
if [ "${core_major:-0}" -lt 2 ]; then
|
||||||
|
echo "poetry-core ${core_ver} < 2.0: using legacy pyproject.poetry1.toml"
|
||||||
|
cp pyproject.poetry1.toml pyproject.toml
|
||||||
|
else
|
||||||
|
echo "poetry-core ${core_ver} >= 2.0: using PEP 621 pyproject.toml"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "${SUITE:-}" ]; then
|
if [ -n "${SUITE:-}" ]; then
|
||||||
export DEBEMAIL="mig@mig5.net"
|
export DEBEMAIL="mig@mig5.net"
|
||||||
export DEBFULLNAME="Miguel Jacq"
|
export DEBFULLNAME="Miguel Jacq"
|
||||||
|
|
|
||||||
|
|
@ -281,11 +281,6 @@ Clone the repo and then run inside the clone:
|
||||||
poetry install
|
poetry install
|
||||||
```
|
```
|
||||||
|
|
||||||
### AppImage
|
|
||||||
|
|
||||||
Download the AppImage from the Releases page, make it executable, and put it on
|
|
||||||
your `$PATH`.
|
|
||||||
|
|
||||||
## Full usage info
|
## Full usage info
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|
|
||||||
10
release.sh
10
release.sh
|
|
@ -7,11 +7,6 @@ filedust -y .
|
||||||
|
|
||||||
# Publish to Pypi
|
# Publish to Pypi
|
||||||
poetry build
|
poetry build
|
||||||
poetry publish
|
|
||||||
|
|
||||||
# Make AppImage
|
|
||||||
poetry run pyproject-appimage
|
|
||||||
mv JinjaTurtle.AppImage dist/
|
|
||||||
|
|
||||||
# Sign packages
|
# Sign packages
|
||||||
for file in `ls -1 dist/`; do qubes-gpg-client --batch --armor --detach-sign dist/$file > dist/$file.asc; done
|
for file in `ls -1 dist/`; do qubes-gpg-client --batch --armor --detach-sign dist/$file > dist/$file.asc; done
|
||||||
|
|
@ -51,8 +46,8 @@ REPO_ROOT="${HOME}/git/repo_rpm"
|
||||||
REMOTE="ashpool.mig5.net:/opt/repo_rpm"
|
REMOTE="ashpool.mig5.net:/opt/repo_rpm"
|
||||||
|
|
||||||
DISTS=(
|
DISTS=(
|
||||||
|
fedora:44
|
||||||
fedora:43
|
fedora:43
|
||||||
fedora:42
|
|
||||||
)
|
)
|
||||||
|
|
||||||
for dist in ${DISTS[@]}; do
|
for dist in ${DISTS[@]}; do
|
||||||
|
|
@ -87,6 +82,9 @@ for dist in ${DISTS[@]}; do
|
||||||
qubes-gpg-client --local-user "$KEYID" --detach-sign --armor "$RPM_REPO/repodata/repomd.xml" > "$RPM_REPO/repodata/repomd.xml.asc"
|
qubes-gpg-client --local-user "$KEYID" --detach-sign --armor "$RPM_REPO/repodata/repomd.xml" > "$RPM_REPO/repodata/repomd.xml.asc"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# If we got this far, we can publish to PyPI
|
||||||
|
poetry publish
|
||||||
|
|
||||||
echo "==> Syncing repo to server..."
|
echo "==> Syncing repo to server..."
|
||||||
rsync -aHPvz --exclude=.git --delete "$REPO_ROOT/" "$REMOTE/"
|
rsync -aHPvz --exclude=.git --delete "$REPO_ROOT/" "$REMOTE/"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue