diff options
author | Jelle van der Waa <jelle@archlinux.org> | 2024-01-21 13:25:57 +0100 |
---|---|---|
committer | Christian Heusel <christian@heusel.eu> | 2024-03-23 23:57:45 +0100 |
commit | 81f5e7b3b3f6e2687ebca03e212e0e7bc2da171f (patch) | |
tree | d84fce3878db9e52a8628e359e6d8882ebb22f78 /src/lib/common.sh | |
parent | 01b6b0849ed098d4d3d8db3591443db3df6aa11b (diff) | |
download | devtools-81f5e7b3b3f6e2687ebca03e212e0e7bc2da171f.tar.xz |
feat(version): add command to automatically detect and setup nvchecker
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>
Diffstat (limited to 'src/lib/common.sh')
-rw-r--r-- | src/lib/common.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/common.sh b/src/lib/common.sh index ff767c6..00ece97 100644 --- a/src/lib/common.sh +++ b/src/lib/common.sh @@ -342,3 +342,9 @@ is_debug_package() { pkgdesc="$(getpkgdesc "${pkgfile}")" [[ ${pkgdesc} == "Detached debugging symbols for "* && ${pkgbase}-debug = "${pkgname}" ]] } + +join_by() { + local IFS="$1" + shift + echo "$*" +} |