Age | Commit message (Collapse) | Author |
|
Since version 2.15.1 nvchecker emits a warning for version strings that
it consideres invalid (e.g. in the case of PyPI).
These warning messages get in the way (the first version emitted via a
warning is used as version to compare against) of retrieving the latest
version of an upstream and therefore we ignore them.
Component: pkgctl version check
Signed-off-by: David Runge <dvzrv@archlinux.org>
|
|
This fixes issues with packages containing plus signs, that need to be
escaped in toml as well as the extended grep regex.
Component: pkgctl version check
|
|
So far the commands would stop execution if one of the target
directories did not contain a PKGBUILD instead of just reporting failure
for that directory. Fix this by replacing the 'die' calls with setting
the error for the spinner facility.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
This allows us to have more control over the output and status logs.
Using this method we are able to avoid cluttering the version upgrade
subcommand while downloading sources for updating the checksums.
Having this internally will also allow us in the future to have smart
checksums updating by only trying to change the checksums of sources
that have actually changed, for example when adjusting a patch file we
should avoid trying to overwrite the archive checksums unintentionally.
Component: pkgctl version upgrade
|
|
This commit aims to make 'pkgctl version upgrade' also update checksums
in addition of bumping the pkgver and reseting the pkgrel.
Component: pkgctl version upgrade
|
|
In certain scenarios, like when an URL is checked that asks for
credentials or other kind of input, the process blocks and waits for
stdin input. This isn't particularly useful during scripted execution
and in our cases also just an indicator for like a none existing GitHub
repository.
To avoid this situation, disable git terminal prompts.
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Introduce a new version subcommand `setup` which does a best effort to
generate the most minimal required .nvchecker.toml file for specific
sources.
It supports a wide range of common sources like:
- Git, GitHub, GitLab, Hackage, NPM, PyPI, RubyGems, CPAN, crates.io
The creation logic is based on matching a domain for a source which is
something predictable and then simply passes an array of the url parts
for every source creator to extract the useful bits out of the url
array.
Component: pkgctl version setup
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Jelle van der Waa <jelle@archlinux.org>
|
|
Several subcommands accept multiple paths in a way that passing a
wildcard is an expected use case. Previously this wasn't possible if the
main directory contained any text files or scripts.
Fix this by skipping none directory paths for such commands.
Component: pkgctl
Signed-off-by: Morten Linderud <foxboron@archlinux.org>
|
|
Change 'none pkgbase' to 'non-pkgbase' as the sentence refers sections
that are not the pkgbase section, rather than an empty pkgbase section
or something of that sort that could be misconstrued by using the word
'none'.
Component: pkgctl version check
|
|
For pkgbases with '.' in the name, the TOML-section must be wrapped in
double quotes in order for it not to be parsed as a supersection and a
subsection. This case was not properly handled by checks for if the
TOML-file contains a pkgbase section, and for if the TOML-file contains
superfluous sections. Address this by handling optional double quotes in
the greps related to said checks.
This was discovered in the AUR package ruby-cool.io and the issue can be
reproduced with the following minimal PKGBUILD and .nvchecker.toml file:
$ cat PKGBUILD
pkgname=ruby-cool.io
pkgver=1.8.0
$ cat .nvchecker.toml
["ruby-cool.io"]
source = "gems"
gems = "cool.io"
Before the fix:
$ pkgctl version check
Failure
x ruby-cool.io: missing pkgbase section in .nvchecker.toml: ruby-cool.io
After the fix:
$ pkgctl version check
GEN lib/version/check.sh
Out-of-date
✓ ruby-cool.io: current version 1.8.0 is latest
Component: pkgctl version check
|
|
Component: pkgctl version check
Component: pkgctl version update
|
|
Enhanced and overhauled the documentation for the 'version' subcommand.
The improvements include comprehensive details on the subcommand's
behavior, usage, and a variety of scenarios it handles.
Added a central section within the pkgctl-version manpage that documents
the nvchecker configuration and rules.
Component: pkgctl version
Singled-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
It can be handy to have an exit code that allows better status
indication or chaining.
On exit, return one of the following codes:
- 0: Normal exit condition, all checked versions are up-to-date
- 1: Unknown cause of failure
- 2: Normal exit condition, but there are out-of-date versions
- 3: Failed to run some version checks
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Sometimes it can be desired to get a results for each entry even if the
current version is up-to-date. Add a --verbose option to print this
optional detail.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
It may take quite some time to check a lot of upstream versions.
However, we still want to nicely group the results together. To avoid
just showing a static status message it makes much more sense to show a
dynamic spinner with a summary of the progress.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Collect all check results in arrays and pretty print the results after
grouping them together based on out-of-date, up-to-date and failures.
Print a summary that shows a brief statistic about the results when
processing multiple check items.
Component: pkgctl version check
Component: pkgctl version upgrade
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This adds support for global keyfile from the user config home
XDG_CONFIG_HOME which allows to set tokens for GitHub and GitLab for
certain nvchecker configuration.
When ~/.config/nvchecker/keyfile.toml exists, it will automatically be
appended as keyfile of the local .nvchecker.toml file.
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
Add defensive programming to the execution chain of the version check
subcommand for graceful error handling of subprocesses as well as errors
returned from nvchecker itself indicated in the returned JSON.
Furthermore this fixes a bug when processing multiple packages where the
pkgbase variable is stuck for subsequent packages that do not declare a
pkgbase variable itself.
Component: pkgctl version check
Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
|
|
This subcommand applies the detected upstream version upgrades to a
PKGBUILD.
Component: pkgctl version upgrade
Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
Component: pkgctl version check
Signed-off-by: Christian Heusel <christian@heusel.eu>
|
|
The version subcommand handles pkgver related commands, the first
subcommand being `check`. Check runs nvchecker if a `.nvchecker.toml`
file exists and compares the current pkgver with the latest release.
Introduces nvchecker as optional dependency which has to be installed in
order to use this particular subcommand.
BREAKING CHANGE: formerly pkgctl version would output the version of the
pkgctl tool, now it is used as a version related subcommand.
Fixes #140
Component: pkgctl version
Component: pkgctl version check
Co-authored-by: Christian Heusel <christian@heusel.eu>
|
|
Related to https://gitlab.archlinux.org/archlinux/devtools/-/issues/125
Closes #125
Signed-off-by: Christian Heusel <christian@heusel.eu>
Co-Authored-By: Levente Polyak <anthraxx@archlinux.org>
|