ca72c7b7fc
forgeversion: make sure nothing is stored in distprefix
...
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2359090
2025-05-31 16:36:29 -05:00
6be567e9c6
Add support for go.googlesource.com and tests
...
Fixes: rhbz#2303884
2024-08-13 16:56:46 -05:00
d8a5b8c184
macros: entirely remove the Release defined warning
...
This seems to cause false positives. Let's nix it completely.
2024-08-06 20:15:21 -05:00
9e9ff33b6e
forgeversion: make version set after release a warning
...
Let's make parsing a bit more resilient.
2024-04-07 04:09:39 +00:00
a6e64cef92
lint: address ruff deprecation warnings and regen config
2024-03-02 19:01:23 +00:00
8ddd2f14aa
change %forge macro with %forgename macro
...
Support for specifying forge schemes for unrecognized forges was added
in 6bd567d2ea .
This changes the macro name used to define the forge scheme from
`%forge` to `%forgename` to avoid potential namespace conflicts.
6bd567d2ea was never released, so this
should not break any package in the wild.
2023-12-07 05:12:17 +00:00
6ee060464f
tests/vectors: add github_forgesource_branch
2023-11-04 17:36:18 +00:00
6e412b63dc
License test fixtures as GPL-1.0-or-later OR MIT
...
This way, they can be reused in other Fedora macro packages.
2023-09-18 22:31:00 +00:00
6bd567d2ea
Allow specifying a custom forge scheme
...
Users may wish to use the forge macros with self-hosted forges. Instead
of having to hardcode every single forge mapping, this allows users to
choose a forge scheme themselves.
2023-09-07 22:50:35 +00:00
2410329783
lint: fix PLW1510 error
...
We don't use `check=True`. Checking the returncode is handled manually.
2023-08-18 17:56:34 +00:00
354ce4a51e
add -b flag to %forgeversion; update test vectors
...
This allows using %forgeversion with a custom base version.
2023-08-18 17:54:24 +00:00
f06ccd7dff
%forgeversion: use %version0 instead of %version
...
See the discussion in
https://pagure.io/packaging-committee/pull-request/1295 .
Note that `fedora.zalias` sets %version0 to %version if the former is
not set, but this change makes sure that %version0 is preferred if the
macros are set differently.
2023-08-18 17:52:35 +00:00
c1684e58bb
tests: fix _TestVector.expected_undefined type
2023-08-14 03:44:34 +00:00
c4b13b4a0e
tests: check %forgesetup
2023-08-14 01:23:49 +00:00
b7d96e62af
tests: cache macros_path and lua_path
...
We don't need to retrieve these values every time a macro is evaluated.
2023-08-13 19:42:37 +00:00
c3ee4d9f82
add noxfile to run tests and mockbuilds
2023-08-13 17:25:35 +00:00
145b7fc72a
add %forgeversion to add snapshot info to Version
...
See the %forgeversion docstring for usage
2023-08-13 16:57:01 +00:00
6ba0cccb01
tests: improve github commit test fixtures
2023-08-13 16:50:30 +00:00
7d2be0f775
tests: improve test_vectors stdout/stderr checking
2023-08-13 16:44:32 +00:00
dd6657bbbc
tests: add test vectors for multisource specfiles
...
Fixes: https://todo.sr.ht/~gotmax23/forge-srpm-macros/4
2023-08-13 07:39:43 +00:00
f34ce358c4
tests: add bitbucket test vector
2023-08-13 07:09:28 +00:00
800a8a119e
tests: add test vectors for Pagure
2023-08-13 07:09:28 +00:00
45f4ca7b41
tests: add extensive yaml test vectors file
...
Fixes: https://todo.sr.ht/~gotmax23/forge-srpm-macros/2
2023-08-13 07:09:28 +00:00
1b71a04fce
tests: remove returns to fix PytestReturnNotNoneWarning
2023-08-13 03:22:52 +00:00
006d6e40cb
tests: use MACRO_LUA_DIR env var instead of MACRO_LUA_PATH
2023-03-27 19:28:10 -05:00
a5efbf7ebc
tests: check urls for nested Gitlab subgroups
2023-03-27 19:28:02 -05:00
9b79de3f97
tests: add test_slash_tags
2023-03-27 17:35:16 -05:00
916ef82bd5
add support for codeberg
2023-03-27 16:18:54 -05:00
b7e60c0aab
add initial testing aparatus
...
- Add evaluater fixture to evaluate macros against the lua and macro
defintions in the local directory.
- Add unit tests for the most basic functionality.
2023-03-27 14:08:23 -05:00