Commit Graph

8 Commits

Author SHA1 Message Date
linsui
b6c2a01ecd list-git-tags: fix for tags with / in the tag name 2023-02-10 18:29:52 +08:00
José Romildo
0b9c39e819 gitUpdater: fix variable default value 2022-10-01 12:27:09 -03:00
José Romildo
f15117a874 generic-updater: more flexible with name, pname, version and attr path
- This information is availabe from environment variables defined by
maintainers/scripts/update.nix

- Renamed the shell script to generic-update-script.sh

- Add a new optional argument (representing the package name) to the
shell script

- The version lister is called with a new optional
argument (representing the package attribute path)
2022-09-27 23:41:53 -03:00
Kira Bruneau
ef57e2fb8d common-updater-scripts/list-git-tags: prefer src.meta.homepage 2022-04-23 15:30:56 -04:00
José Romildo
ba59355e81 gitUpdater: init
- Add the 'gitUpdater' helper function to update git based packages, using the
'genericUpdater' function.
- Rework argument passing to the `list-git-tags' and 'list-archive-two-level-versions' scripts.
- Replace 'genericUpdater' plus 'list-git-tags' by 'gitUpdater'
2022-02-21 13:01:49 -03:00
Samuel Gräfenstein
8ae7cd8a93
common-updater-scripts/*: /bin/sh -> /usr/bin/env bash 2021-10-01 18:42:18 +02:00
Samuel Gräfenstein
9a1bf524f5
common-updater-scripts/list-git-tags: don't print commands 2021-09-29 16:04:21 +02:00
José Romildo Malaquias
827a6619eb common-updater-scripts: add scripts to help update packages
- updateScript:
  A nix expression that can be used in passThrough to update a package

- list-git-tags:
  A shell script to list available tags in a git repository

- list-archive-two-level-versions:

  A shell script to list available versions in a web site in two
  levels: there is a page listing the available major.minor versions,
  and for each of them there is another page listings the patch level
  versions major.minor.patch.

  It is suitable for Xfce packages for instance.

How the updater works:

1. collect the available versions from the source repository (using a
script given as argument)

2. print the collected versions (for debugging)

3. (optionally) apply some transformation to the collected versions to
make them compatible with the versions used in nixpkgs (for instance,
tags in the Xfce git repository may be prefixed with the package name,
and the prefix need to be removed)

4. sort the available versions in decreasing order

5. choose the first version that pass validation:
   - check if the version may be a development version

   - if the version IS unstable, skip it and give a warning about
   skipping a development version (for debugging)

   - if the version COULD BE unstable, take it and give a warning
   about taking a potential development version (for debugging)

   - if the version IS stable, take it

6. update the package version and checksum in its nix expression

7. print the git commands for adding the modified files and for
committing the changes
2020-04-15 09:45:25 -03:00