Commit Graph

176 Commits

Author SHA1 Message Date
figsoda
4f183f2d94 reduce false positives when replacing versions 2023-03-20 22:42:41 -04:00
figsoda
3e2b3c8a13 reject empty hashes 2023-02-12 10:35:13 -05:00
bors[bot]
42e248829e
Merge #138
138: remove trailing `.git` for github diff urls r=figsoda a=figsoda



Co-authored-by: figsoda <figsoda@pm.me>
2023-01-27 23:41:24 +00:00
figsoda
9a629ced22 remove trailing .git for github diff urls 2023-01-27 17:30:52 -05:00
Jörg Thalheim
ab45f140f6 nix-update: add url parameter to override the repository discovery 2023-01-26 10:06:29 +01:00
figsoda
cab46f7912 update list of supported sites 2023-01-21 18:59:31 -05:00
figsoda
dc1b2af4da gitea support 2023-01-21 15:31:30 -05:00
figsoda
435a533439 clean up eval_expression 2023-01-08 12:32:46 -05:00
figsoda
e386585a0e Merge branch 'master' of https://github.com/mic92/nix-update into system 2023-01-08 12:25:54 -05:00
figsoda
bf2ee2bbf0 system_flags -> extra_flags, move experimental features to extra_flags 2023-01-08 10:35:32 -05:00
figsoda
3928ea476b pass system when importing nixpkgs 2023-01-08 10:35:17 -05:00
Jörg Thalheim
7412eff904 improve readability of eval expression 2023-01-08 08:46:48 +01:00
figsoda
329317dbdd add --system 2023-01-04 19:55:31 -05:00
Pol Dellaiera
387027ee08
feat: let PHP extension be updatable by this tool
Fix the computation of the position by detecting if the pkg is a PHP extension
2022-12-30 21:43:48 +01:00
figsoda
71fbce46cf default attribute to $UPDATE_NIX_ATTR_PATH 2022-12-24 21:38:18 -05:00
Jörg Thalheim
bb901a38a4
Merge pull request #118 from figsoda/flakes
Flakes support
2022-12-11 19:19:40 +00:00
Jörg Thalheim
6332016c85 share more code between flake and non-flake version 2022-12-11 20:12:35 +01:00
Jörg Thalheim
d4eceb200e switch to ruff from flake8 2022-12-11 13:53:00 -05:00
figsoda
e5f57c258c add support for flakes 2022-12-08 12:46:35 -05:00
figsoda
263c2b3564 fix diff when version regex is applied 2022-11-29 13:26:11 -05:00
figsoda
0dea3ba6f3 prefer versions with the same prefix 2022-11-29 12:58:43 -05:00
figsoda
895f44126b add flag to run passthru.updateScript if possible 2022-11-28 10:43:41 -05:00
Jörg Thalheim
64f5cc5ddc
Merge pull request #113 from figsoda/diff
Add diff feature
2022-11-27 20:46:11 +01:00
figsoda
baf3779e54 add diff features 2022-11-27 09:52:04 -05:00
Jörg Thalheim
591d491225 nix_update: use -L to get more logs when building 2022-11-27 13:12:06 +01:00
figsoda
2d4aa23824 remove unused statement and variable 2022-11-23 19:10:36 -05:00
figsoda
ed586d4915 fix isort lints 2022-11-21 15:37:14 -05:00
figsoda
e1067480e9 fix duplicate import from merge conflicts 2022-11-21 15:24:11 -05:00
figsoda
f0490e7196
Merge branch 'master' into unstable 2022-11-21 15:07:18 -05:00
Winter
ceb7d8df35 add support for npmDeps 2022-11-20 13:19:07 -05:00
figsoda
350d534ac7 use .utils.run instead of subprocess.run 2022-11-17 12:49:14 -05:00
figsoda
0cbea8ba78 inherit stdout and stderr when appropriate 2022-11-17 12:46:56 -05:00
figsoda
e8629b612e add support for cargoDeps 2022-11-14 21:07:37 -05:00
figsoda
4fab744eac remove shebangs in inexecutable files, format with black and isort 2022-11-14 17:14:09 -05:00
Jörg Thalheim
72e40caf8e dont pass args[0] to python's argparse 2022-11-14 16:51:31 +01:00
figsoda
e826940d01 fix parse_args 2022-11-14 10:43:14 -05:00
figsoda
409b07e2e0 fix typo 2022-11-14 10:37:41 -05:00
Jörg Thalheim
3a5f9c529a
Merge pull request #102 from figsoda/fetchcrate
add fetchCrate support
2022-11-14 16:25:54 +01:00
figsoda
725c510332 add fetchCrate support 2022-11-14 10:18:02 -05:00
figsoda
dbb398b08f add fallback to overrideAttrs 2022-11-14 09:49:30 -05:00
Jörg Thalheim
570a6ac64b add changelog feature and add integration test for it 2022-11-14 15:38:56 +01:00
Jörg Thalheim
4dbc76a572 also run git-add when version was not bumped
Otherwise git-commit with the template won't work
2022-11-14 14:15:17 +01:00
Winter
9631d62a89 add support for buildNpmPackage 2022-11-10 17:56:31 +01:00
Winter
5692ffc91d don't use nix-prefetch 2022-11-10 17:56:31 +01:00
zowoq
e4de7e6287 add vendorHash 2022-09-21 17:32:12 +10:00
zowoq
9e3ab3c1d8 cargo_sha256 -> cargo_deps
rename for clarity as it is both cargoHash and cargoSha256
2022-09-21 17:31:30 +10:00
zowoq
eba1571866 remove modSha256
no longer used in nixpkgs
2022-09-21 17:30:26 +10:00
schnusch
1d262f2ae9 nix_update/eval.py: pkg.src.url.rev -> pkg.src.rev 2022-09-21 16:27:53 +10:00
Jörg Thalheim
06dd722d36 allow to manually override filename that is patched 2022-06-14 11:22:01 +02:00
Jörg Thalheim
70a39cea1f
fix finding git directories for non-default import paths 2022-05-19 10:51:43 +02:00
Jörg Thalheim
501befb415
don't override existing experimental features
This way nix-update can be used on repos that uses flake builtins.
2022-05-19 09:52:17 +02:00
Sandro Jäckel
1f6af68d87
Do not stage files when updating 2022-02-15 21:08:45 +01:00
schnusch
69f0204a44 add fetch_gitlab_snapshots 2022-01-22 11:17:57 +01:00
schnusch
e96a0baace do not silently ignore unexpected entries in GitHub's ATOM feed 2022-01-19 20:33:23 +01:00
schnusch
1825688b08 change default ref of --version=branch to HEAD 2022-01-19 20:33:23 +01:00
schnusch
395949474a update unstable packages from git to latest branch
This adds VersionPreference.BRANCH. By passing `--version=branch[=<name>]`
the commits of branch `<name>` (`master` if ommitted) are fetched and versions
`unstable-YYYY-MM-DD` are generated containing all commits up to and including
this date.
2022-01-19 20:33:23 +01:00
schnusch
cde9ee588f is pkg.src.url.rev even a real thing? 2022-01-19 20:33:23 +01:00
schnusch
0f0bd7f9b3 use Version objects instead of version number strings
Add the optional attribute `rev` that is also replaced by `replace_version`
if present.
2022-01-19 20:33:18 +01:00
schnusch
3137aef4fd compose commit message in format_commit_message 2022-01-17 01:22:44 +01:00
schnusch
380e6e4e41 add --write-commit-message for use in scripting 2022-01-17 01:22:44 +01:00
Jörg Thalheim
2f498d50d7 don't require valid version if --version=skip 2021-08-26 15:45:05 +02:00
Jörg Thalheim
008e69ed04 allow to upload cargo checksum when source is local 2021-08-26 13:08:18 +02:00
Jörg Thalheim
bec42b219b fix evaluation on macos for pkgs with tests
fixes https://github.com/Mic92/nix-update/issues/62
2021-08-21 10:33:02 +02:00
Sandro Jäckel
4b2841fd90
Add sourcehut support 2021-08-15 17:09:08 +02:00
Sandro Jäckel
8bfe7fe26b
Disable nixpkgs overlays 2021-08-15 16:57:06 +02:00
Jörg Thalheim
8e27b16d94
Merge pull request #56 from schnusch/savannah
add support for mirror://savannah/
2021-07-27 16:57:07 +01:00
Jörg Thalheim
1ac9216924 fix formatting with black 2021-07-27 17:41:25 +02:00
Sandro
f70dd57787
Add support for cargoHash 2021-07-27 15:04:52 +02:00
schnusch
6041e0fb1d add support for mirror://savannah/ 2021-05-19 17:28:05 +02:00
Jörg Thalheim
ff17ed0b0a
fix extra parantheses 2021-04-09 08:17:58 +02:00
Jörg Thalheim
40f63b77eb
rename get_config_check_meta to disable_check_meta 2021-03-25 10:59:30 +01:00
Sandro Jäckel
0135172f1a
Turn of checkMeta for nix-prefetch
which leads to errors if inherit is used in a meta attribute
2021-03-25 10:36:13 +01:00
Jörg Thalheim
777a5fca04
Apply suggestions from code review 2021-02-22 04:52:27 +00:00
Tim Steinbach
47b25c5a65
Fix --format
If used in combination with --commit, the changes
were previously not staged and hence left uncommitted
2021-02-21 17:15:00 -05:00
Tim Steinbach
76cf63bbe2
Add --format flag
The flag will invoke nixpkgs-fmt
2021-02-21 13:15:29 -05:00
Jörg Thalheim
b9558b2a1e fix nix-update if not commit flag is passed 2021-02-21 18:24:26 +01:00
Tim Steinbach
41929e6613
Add --review flag 2021-01-28 09:40:19 -05:00
Jörg Thalheim
13a6940e06
fix unstable check 2021-01-27 12:41:33 +01:00
Jörg Thalheim
619e4c32e6
Update nix_update/options.py 2021-01-25 19:04:42 +00:00
Jörg Thalheim
8bfdad152f
refactor stable/unstable versions and regex filtering 2021-01-25 00:30:37 +01:00
Tim Steinbach
caf298f4f0
Add --unstable-version argument
Enabling this flag will include all versions
containing '-' and '+' from being considered valid.
As per SemVer, these are the separators for unstable
versions (i.e. "-RC2", "+abcdef" suffixes).
2021-01-18 12:00:14 -05:00
Jörg Thalheim
4c85815dd4
Merge pull request #36 from Mic92/fix-hashes 2021-01-09 10:22:12 +00:00
Jörg Thalheim
9e096645c7
ensure XDG_RUNTIME_DIR before calling nix-prefetch 2021-01-09 11:20:20 +01:00
Jörg Thalheim
05dccf154e
add integration tests 2021-01-09 11:20:20 +01:00
Jörg Thalheim
f6e0adb59b
fix new nix hash cli syntax 2021-01-09 07:51:27 +01:00
Milan Pässler
19f6b28ff8
fix UnboundLocalError
Closes #34
2021-01-02 19:43:42 +01:00
Jörg Thalheim
8fb6c5e6c6
Merge pull request #31 from NeQuissimus/version_extract 2020-12-25 17:40:55 +00:00
Tim Steinbach
7d487d245a
Allow extracting version information
This can be used to remove tag prefixes, suffixes or similar

Closes #29
2020-12-25 10:27:50 -05:00
Jörg Thalheim
75dc3ab0c6
Merge pull request #32 from NeQuissimus/fix_patterns
Fix pattern replacements
2020-12-24 06:48:35 +00:00
Tim Steinbach
6bc1c4573f
Check return status for build/test
Updating failed if either of these return a non-zero return
code and subsequent actions (i.e. `git commit`) should not be
invoked.
2020-12-22 14:21:06 -05:00
Tim Steinbach
a8d0cffcda
Fix pattern replacements
SRI hashes containing regex characters such as '+'
break the replacement logic intended with `re.sub`
Use strict string replacements instead
2020-12-22 14:09:58 -05:00
Tim Steinbach
80ced10929
Skip updating hashes without version change 2020-12-01 16:00:24 -05:00
Jörg Thalheim
fa9511ff69
make flake8 + black happy 2020-12-01 09:36:49 +01:00
Jörg Thalheim
7344500e46
get old version from git 2020-12-01 09:36:48 +01:00
Jörg Thalheim
5b0a4cef5f
normalize hashes 2020-11-29 09:34:04 +01:00
Jörg Thalheim
3fdc0f5fe0
make test flag more generic
nix-update not only supports nixos
2020-11-18 21:34:22 +01:00
Tim Steinbach
ed3f1dd0ab
Add test flag 2020-11-18 10:08:50 -05:00
Jörg Thalheim
78ebf7b1df
always assume nix flakes enabled version
This was adding too much boiler code.
Having one version is easier to maintain.
2020-11-18 09:23:07 +01:00
Jörg Thalheim
23de41fff9
utils.py: fix formatting 2020-08-17 18:17:35 +01:00
Jörg Thalheim
4d35310c51
fix is_nix_flakes check 2020-08-17 09:56:26 +01:00