From a7122934cf9ebf1461d10fec4a4c497f7890b52a Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 19 Apr 2022 16:16:25 +0200 Subject: [PATCH] update-packages: use $PACKAGING_DIR with default value and set verison to 0.2.1 --- CHANGELOG | 1 + README.md | 2 +- scripts/update-packages.sh | 2 +- setup.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 15eac9b..9092f72 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ CHANGELOG ---------- ### Changelog extractor * Added GitHub releases changelog extractor (partially working). +* Added `update-packages.sh` script. 2022-01-18 ---------- diff --git a/README.md b/README.md index 53118ed..c1b9212 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Tools * `changelog_extractor`: Extracts the changelog from a file in an archive, shows the changes sinnce the last version found in the changes file and converts it to the RPM changelog format. * `librariesio-latest-version`: Retrieves the latest version from libraries.io (currently only PyPI is supported) for the given software. The name of the software can be detected from the current working directory. * `specfile-version-updater`: Updates the version in the spec file, remove the old tarball and add the new one. -* `update-packages`: If called with the name of a package, it searches for it in `~/packaging/`, excluding `home:*`-directories, calls `specfile-version-updater`, tries to build it, calls `changelog-extractor`, applies it, and commits the updated package. +* `update-packages`: If called with the name of a package, it searches for it in `$PACKAGING_DIR` (defaults to `~/packaging/`), excluding `home:*`-directories, calls `specfile-version-updater`, tries to build it, calls `changelog-extractor`, applies it, and commits the updated package. Configuration ------------- diff --git a/scripts/update-packages.sh b/scripts/update-packages.sh index d99afd1..3187c06 100755 --- a/scripts/update-packages.sh +++ b/scripts/update-packages.sh @@ -3,7 +3,7 @@ for pkg in "$@"; do SAVEIFS=$IFS # Save current IFS IFS=$'\n' # Change IFS to new line - pkgdir=( $(fd --exclude 'home*' -t d $* $HOME/packaging/) ) + pkgdir=( $(fd --exclude 'home*' -t d $* ${PACKAGING_DIR:-$HOME/packaging}/) ) IFS=$SAVEIFS # Restore IFS if [ ${#pkgdir[@]} -eq 0 ]; then diff --git a/setup.py b/setup.py index 4189b9b..9fa7544 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='packaging_utils', - version='0.2.0', + version='0.2.1', maintainer='Sebastian Wagner', maintainer_email='sebix@sebix.at', python_requires='>=3.6',