]> _ Git - alire.git/commit
Use local repository as reference for publishing (#519)
authorAlejandro R Mosteo <alejandro@mosteo.com>
Sat, 12 Sep 2020 12:21:40 +0000 (14:21 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Sep 2020 12:21:40 +0000 (14:21 +0200)
commit69113c626b13cf1caf7af8aa202b284c66aa8cbc
tree1e619a5d0365478f6bb1c6e0162c379daee9e69f
parent4a023638612b62e1476610200791098bb5268cf9
Use local repository as reference for publishing (#519)

* Publish using local repo and revision as reference

We still require the remote is ready (in essence, that the local repo is not
ahead of the remote), but now it is simply a matter of issuing `alr publish` or
`alr publish <commit|tag|branch>`, and the corresponding commit will be used.

* Refactor long function name to more sensible one

* Fix comments due to bad refactoring

* Test for publishing from inside a repo

* Fixes uncovered by testsuite

Adding defaults for <URL> <commit> complicates things somewhat as we use local
paths for testing that would otherwise be rejected, so a few corner cases have
to be explicitly considered now.
13 files changed:
src/alire/alire-directories.adb
src/alire/alire-publish.adb
src/alire/alire-publish.ads
src/alire/alire-roots-optional.adb
src/alire/alire-roots-optional.ads
src/alire/alire-vcss-git.adb
src/alire/alire-vcss-git.ads
src/alr/alr-commands-publish.adb
src/alr/alr-commands-publish.ads
testsuite/drivers/helpers.py
testsuite/tests/publish/local-repo/test.py [new file with mode: 0644]
testsuite/tests/publish/local-repo/test.yaml [new file with mode: 0644]
testsuite/tests/publish/remote-origin/test.py