Makefile: simplify cockpit repo checkout code
Replace the two rules for test/common and pkg/lib with a single rule based on `git-archive`, avoiding the use of racy `FETCH_HEAD` and side-effecting `git-checkout`. This lets us drop the `flock` call, and introduces some logic to avoid the fetch in case we already have it. We'll hardcode shas from here on out: it's more secure (ie: tamperproof), and more performant (since we don't have to check the ref if we already have the object), in addition to being easier to work with in terms of the required git commands. Use pkg/lib/cockpit.js as a stamp file. This rule will make it easier to expand to more files in the future. One drawback is that when we want to update files from the cockpit/ repository, we'll now need to do it in lock-step: using new API from testlib will force us to adjust to PatternFly changes, for example. Cherry-picked from cockpit-podman commit cfc05e730d6f5d.
This commit is contained in:
parent
b3a9565668
commit
06dd572784
2 changed files with 25 additions and 23 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -16,3 +16,4 @@ pkg
|
|||
POTFILES*
|
||||
tmp/
|
||||
/po/LINGUAS
|
||||
/tools
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue