Skip to content

Commit

Permalink
update-packages: use $PACKAGING_DIR with default value
Browse files Browse the repository at this point in the history
and set verison to 0.2.1
  • Loading branch information
sebix committed Apr 19, 2022
1 parent 0c657cb commit a712293
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CHANGELOG
----------
### Changelog extractor
* Added GitHub releases changelog extractor (partially working).
* Added `update-packages.sh` script.

2022-01-18
----------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='packaging_utils',
version='0.2.0',
version='0.2.1',
maintainer='Sebastian Wagner',
maintainer_email='[email protected]',
python_requires='>=3.6',
Expand Down

0 comments on commit a712293

Please sign in to comment.