]> _ Git - alire.git/log
alire.git
4 years agoBump version to 1.1.0-dev (#697)
Alejandro R Mosteo [Tue, 2 Mar 2021 11:59:13 +0000 (12:59 +0100)]
Bump version to 1.1.0-dev (#697)

* alire.ads: bump version to 1.1.0-dev

* user-changes.md: add header for 1.1

4 years agouser-changes.md: fix format that breaks GH pages rendering (#696)
Fabien Chouteau [Wed, 24 Feb 2021 15:44:30 +0000 (07:44 -0800)]
user-changes.md: fix format that breaks GH pages rendering (#696)

4 years agoBump version to 1.0 (#693)
Alejandro R Mosteo [Wed, 24 Feb 2021 14:40:02 +0000 (15:40 +0100)]
Bump version to 1.0 (#693)

4 years agoFix bash completion after help formatting changes (#694)
Alejandro R Mosteo [Wed, 24 Feb 2021 14:39:21 +0000 (15:39 +0100)]
Fix bash completion after help formatting changes (#694)

4 years agoBumped version to 1.0 RC 3
Alejandro R. Mosteo [Tue, 16 Feb 2021 12:23:58 +0000 (13:23 +0100)]
Bumped version to 1.0 RC 3

4 years agoHelp output formatting (#688)
onox [Tue, 16 Feb 2021 12:21:31 +0000 (13:21 +0100)]
Help output formatting (#688)

* Color commands in alr [help] and display in groups

* Prevent Getopt from intercepting -h and --help

* Change formatting of command and global options help

* Fix test equivalent_help

* Only print title if there are more than zero options

4 years agoFix problem when temp file doesn't exist (#686)
Alejandro R Mosteo [Mon, 8 Feb 2021 11:52:38 +0000 (12:52 +0100)]
Fix problem when temp file doesn't exist (#686)

4 years agouser-changes.md: document SPDX license expressions (#683)
Fabien Chouteau [Sat, 6 Feb 2021 15:55:48 +0000 (16:55 +0100)]
user-changes.md: document SPDX license expressions (#683)

* user-changes.md: document SPDX license expressions

* Typo

* Another typo

Co-authored-by: Alejandro R. Mosteo <amosteo@unizar.es>
4 years agouser-changes.md: Add markers for releases (#684)
Fabien Chouteau [Fri, 5 Feb 2021 10:53:30 +0000 (11:53 +0100)]
user-changes.md: Add markers for releases (#684)

This will help users identify what is new since the last release.

4 years agoMove to stable index version, bump rc version (#682)
Alejandro R Mosteo [Fri, 5 Feb 2021 10:25:46 +0000 (11:25 +0100)]
Move to stable index version, bump rc version (#682)

4 years agoalire.ads: Bump version to 1.0-rc1
Alejandro R. Mosteo [Thu, 4 Feb 2021 12:03:40 +0000 (13:03 +0100)]
alire.ads: Bump version to 1.0-rc1

4 years agoAutomatically narrow down dependencies given as "any" (#675)
Alejandro R Mosteo [Wed, 3 Feb 2021 10:55:10 +0000 (11:55 +0100)]
Automatically narrow down dependencies given as "any" (#675)

* Implement narrowing down of new "any" dependencies

Instead of adding just a foo* dependency, check how it was solved and use that
version to add a more precise (and usually wanted) dependency; e.g., foo^1.2,
foo~0.1

* Fix case of dependency removal

* New test and fixed other tests to new behavior

Many tests explicitly check the added dependencies, so this is extra assurance
about this change.

* Recognize the wildcard as "any" version

* Document user-visible changes

* Add option to disable new behavior

4 years agoalr-platforms-windows.adb: use a specific version of the msys2 auto install script...
Fabien Chouteau [Wed, 3 Feb 2021 10:48:09 +0000 (11:48 +0100)]
alr-platforms-windows.adb: use a specific version of the msys2 auto install script (#678)

Use a fixed version instead of latest on master branch of msys2-installer.
Changes in the master branch can break our installation code.

4 years agoFix problem with temporaries in Windows (#674)
Alejandro R Mosteo [Tue, 2 Feb 2021 18:17:51 +0000 (19:17 +0100)]
Fix problem with temporaries in Windows (#674)

* Attempt fix at windows temporaries

* Remove now superfluous exception handler

* Review fix

4 years agoWarn about ^0.x dependencies (#669)
Alejandro R Mosteo [Tue, 2 Feb 2021 18:00:13 +0000 (19:00 +0100)]
Warn about ^0.x dependencies (#669)

* Update documentation

* Warn when adding a ^0.x dependency

* Warn on suspicious caret use

This warning is shown at most once per run, and is an optional blocker during
`alr with` and `alr publish`.

A new `Alire.Warnings` package allows simple emission of warnings only once.

* Improve comment wording

* Document user-visible changes

* Rebase fixes

* Make the Warning Id its own type

4 years agoalr-platforms-windows.adb: msys2 install command line changed (#677)
Fabien Chouteau [Tue, 2 Feb 2021 17:42:05 +0000 (18:42 +0100)]
alr-platforms-windows.adb: msys2 install command line changed (#677)

https://github.com/msys2/msys2-installer/pull/20 changed the name of the argument for installation prefix of the msys2 installer.
All previous versions are impacted and won't be able to install msys2 at the correct location.

4 years agoRename `alr list` to `alr crates` (#671)
Alejandro R Mosteo [Mon, 1 Feb 2021 09:53:04 +0000 (10:53 +0100)]
Rename `alr list` to `alr crates` (#671)

* Rename `alr list` to `alr crates`

This way there is less confusion about the purposes of `alr crates` and `alr
search`; the former operates on crates and the latter on releases.

* Fix bash completion

* Document user-visible changes

* Remove `crates` command, move to `search --crates`

* Update bash completion for new situation

* Update user-facing document

* Updated testsuite

4 years agoClarify current behavior of actions (#672)
Alejandro R Mosteo [Fri, 29 Jan 2021 09:37:25 +0000 (10:37 +0100)]
Clarify current behavior of actions (#672)

* Remove old references to [general] section

* Clarify running moments of actions

4 years agoSeparate non-preelaborable parts of Config (#670)
Alejandro R Mosteo [Fri, 29 Jan 2021 09:36:57 +0000 (10:36 +0100)]
Separate non-preelaborable parts of Config (#670)

* Separate non-preelaborable parts of Config

These parts are now in Alire.Config.Edit

* Fixes for Windows-specific sources

4 years agoNarrow check for deprecated Alire metadata (#668)
Alejandro R Mosteo [Thu, 28 Jan 2021 09:37:10 +0000 (10:37 +0100)]
Narrow check for deprecated Alire metadata (#668)

This should exclude false positives for actual alire sources in a child folder.

4 years agoRemove use of build/clean relocations (#667)
Alejandro R Mosteo [Thu, 28 Jan 2021 09:36:55 +0000 (10:36 +0100)]
Remove use of build/clean relocations (#667)

* Remove use of build/clean relocations

* Document user-facing visible changes

4 years agoalr-commands-init.adb: fix generated gpr file (#665)
Fabien Chouteau [Mon, 25 Jan 2021 12:02:54 +0000 (13:02 +0100)]
alr-commands-init.adb: fix generated gpr file (#665)

#664

4 years agoAlire.Properties.Licenses: Add support of SPDX expression (#629)
Fabien Chouteau [Wed, 13 Jan 2021 13:11:11 +0000 (14:11 +0100)]
Alire.Properties.Licenses: Add support of SPDX expression  (#629)

* Alire.Properties.Licenses: Add support of SPDX expression

The legacy license support is still available but will trigger warning
messages.

* Update catalog-format-spec.md

* Add support for custom license ID

* Update catalog-format-spec.md

* Update alire.toml

* tests/index/bad-license-too-long: fix index version

4 years agoAllow unknown enum values in index manifests and new `index --check` (#656)
Alejandro R Mosteo [Mon, 4 Jan 2021 18:14:46 +0000 (19:14 +0100)]
Allow unknown enum values in index manifests and new `index --check` (#656)

* Detect wrong enum values only in local manifests

This allows backwards compatibility for the index, but catches user mistakes.

* New `alr index --check`, check unknown enum values

* Testsuite: proper behavior of enum checks

* Document user-facing changes

4 years agoAdd handling of CentOS, Fedora, Red Hat and their package manager (#20) (#601)
Christophe Gouiran [Wed, 30 Dec 2020 17:31:59 +0000 (18:31 +0100)]
Add handling of CentOS, Fedora, Red Hat and their package manager (#20) (#601)

* Add handling of CentOS, Fedora, Red Hat and their package manager (#20)

* Transform Redhat version scheme into semver one (#20)

* RPM: Take epochs into account for versions

Co-authored-by: Alejandro R. Mosteo <amosteo@unizar.es>
4 years agoUpdated dependencies for Windows publishing (#655)
Alejandro R Mosteo [Wed, 30 Dec 2020 00:07:15 +0000 (01:07 +0100)]
Updated dependencies for Windows publishing (#655)

4 years agopacman: Remove unneeded -e flag (#654)
Alejandro R Mosteo [Wed, 30 Dec 2020 00:06:43 +0000 (01:06 +0100)]
pacman: Remove unneeded -e flag (#654)

This flag filters out packages installed indirectly (as dependencies), causing
our detection of such a package to fail. -Q by design already only works on
installed packages, so that's all we need.

4 years agoalr init: disable warnings for No_Exception_Propagation (#649)
Fabien Chouteau [Wed, 30 Dec 2020 00:06:05 +0000 (01:06 +0100)]
alr init: disable warnings for No_Exception_Propagation (#649)

For embedded ZFP run-time this warning will pop everywhere.

4 years agoFix pacman pkg version detection to consider epochs (#652)
Alejandro R Mosteo [Wed, 23 Dec 2020 16:53:35 +0000 (17:53 +0100)]
Fix pacman pkg version detection to consider epochs (#652)

* Fix pacman pkg detection to consider epochs

* Relaxed parsing for Pacman versions

4 years agoBump index version to devel-0.5 (#651)
Alejandro R Mosteo [Tue, 22 Dec 2020 10:07:26 +0000 (11:07 +0100)]
Bump index version to devel-0.5 (#651)

* Bump index version to devel-0.5

The addition of more enum values to support other distributions is a
breaking change. This raises the question of whether we should simply drop
unknown enum values, as this could well work. But then, using an improper value
would silently fail. Perhaps the warning could be disabled for normal use and
re-enabled for publish?

* Fix python formatting (missing empty lines)

5 years agoAlr.Commands.Withing: Be able to compose paths with nested components (#637)
Alejandro R Mosteo [Fri, 18 Dec 2020 09:37:47 +0000 (10:37 +0100)]
Alr.Commands.Withing: Be able to compose paths with nested components (#637)

* Alr.Commands.Withing: Be able to compose paths

* Testsuite: test for the bugfix

5 years agoEnable verbose spawn only if -v is in effect (#648)
Alejandro R Mosteo [Fri, 18 Dec 2020 09:37:21 +0000 (10:37 +0100)]
Enable verbose spawn only if -v is in effect (#648)

5 years agoEnable fedora-latest docker image for testing (#619)
Alejandro R Mosteo [Tue, 1 Dec 2020 17:19:10 +0000 (18:19 +0100)]
Enable fedora-latest docker image for testing (#619)

5 years agoBetter feedback on malformed hash in index (#636)
Alejandro R Mosteo [Tue, 1 Dec 2020 16:00:49 +0000 (17:00 +0100)]
Better feedback on malformed hash in index (#636)

* Better feedback on malformed hash in index

Fix .gitignore so only the root /alire is ignored

* Fix for breaking change in used action

5 years agoSeparate workflow to test unsupported package manager platform (#623)
Alejandro R Mosteo [Mon, 30 Nov 2020 12:21:15 +0000 (13:21 +0100)]
Separate workflow to test unsupported package manager platform (#623)

* Workflow to test with unsupported package manager

* Add config option to disable distro detection

With test

* Fixes for circular elaboration

* Fix test for slight change in behavior

Before the last changes to break circularities, we tried to load the manifest
as part of the config loading process. Now we are satisfied with finding a
properly named file at the expected place. This causes one test to not detect
invalid TOML, since the manifest contents aren't really needed for the test.

5 years agoSolver: Speed-up for impossible dependencies (#620)
Alejandro R Mosteo [Fri, 20 Nov 2020 14:20:49 +0000 (15:20 +0100)]
Solver: Speed-up for impossible dependencies (#620)

* Solver: Speed-up for impossible dependencies

Whenever a solution is incomplete we keep looking for solutions. But if the
reason for incompleteness is an impossible request (non-existent crate or
version), this resulted on finding all combinations for the rest of crates that
do have satisfiable dependencies.

With this patch, impossible situations are considered part of the "complete"
solution (as there cannot be a more complete one), which allows the solver to
use complete the search much more quickly, as no pointless attempts for more
solutions are made.

* Fixes for problems caught by the test suite

The optimization was too aggressive, as it took place before detecting
externals. Also, it should only apply to direct unavoidable dependencies, as
indirect impossibilities can be avoided by other solutions.

5 years agoDo not raise if /etc/os-release doesn't exist (#621)
Alejandro R Mosteo [Thu, 19 Nov 2020 08:45:00 +0000 (09:45 +0100)]
Do not raise if /etc/os-release doesn't exist (#621)

Simply return distro unknown

5 years agoci-windows.yml: replace add-path command (#622)
Fabien Chouteau [Wed, 18 Nov 2020 17:41:24 +0000 (18:41 +0100)]
ci-windows.yml: replace add-path command (#622)

* ci-windows.yml: replace add-path command

see https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

* ci-windows,yml: use bash shell

5 years agoFeedback line when non-empty alire.lock created (#617)
Alejandro R Mosteo [Mon, 16 Nov 2020 15:04:40 +0000 (16:04 +0100)]
Feedback line when non-empty alire.lock created (#617)

Otherwise the changes are listed without context and it's a bit confusing.

5 years agoFix: on `publish --tar`, allow git without remote (#614)
Alejandro R Mosteo [Mon, 9 Nov 2020 08:39:20 +0000 (09:39 +0100)]
Fix: on `publish --tar`, allow git without remote (#614)

If we are only using git to generate the archive, we do not need the remote as
it won't be referenced by the origin.

5 years agoAdd handling of Arch and Arch-based distributions (#600)
Christophe Gouiran [Sat, 7 Nov 2020 14:01:06 +0000 (15:01 +0100)]
Add handling of Arch and Arch-based distributions (#600)

* Add handling of arch and arch based distributions

* Update src/alire/os_linux/alire-platform.adb

Co-authored-by: Alejandro R Mosteo <amosteo@unizar.es>
* Improve former Arch based Linux distributions detection (#600)

* Check first id then id_like key (#600)

* Update alire-platform.adb

Add a debug trace when falling back to id_like key

* Fix line too long style error (#600)

* Handle the case when id_like is a space separated items list (#600)

* More robust regular expression (#600)

* Simplify processing of id and id_key values (#600)

* Easy_Graph is not available in Official Arch repositories (#600)

Co-authored-by: Alejandro R Mosteo <amosteo@unizar.es>
5 years agoAdded alire.toml so alr can build/edit itself (#575)
Alejandro R Mosteo [Fri, 6 Nov 2020 14:28:19 +0000 (15:28 +0100)]
Added alire.toml so alr can build/edit itself (#575)

* Added alire.toml so alr can build/edit itself

Also bumped the patch number, as code changes from now own should appear in a
future release, and 0.7-dev means pre-0.7 according to semantic versioning.

* Code review fixes

* New workflow to check that `alr build` succeeds

5 years agoAdd arch-rolling docker image to CI (#613)
Alejandro R Mosteo [Fri, 6 Nov 2020 14:27:33 +0000 (15:27 +0100)]
Add arch-rolling docker image to CI (#613)

5 years agoAlr.Commands.Edit: add support for custom editor (#611)
Fabien Chouteau [Thu, 5 Nov 2020 17:55:43 +0000 (18:55 +0100)]
Alr.Commands.Edit: add support for custom editor (#611)

* Alr.Commands.Edit: add support for custom editor

The editor can be changed with:
$ alr config --set --global editor.cmd "emacs ${GPR_FILE}

* Update user-changes.md

* Typo

* Typo

5 years agoBump version on master branch to 0.8.0-dev (#564)
Fabien Chouteau [Thu, 5 Nov 2020 12:24:18 +0000 (13:24 +0100)]
Bump version on master branch to 0.8.0-dev (#564)

5 years agoRefactor update logic from Alr into Alire (#609)
Alejandro R Mosteo [Thu, 5 Nov 2020 11:25:27 +0000 (12:25 +0100)]
Refactor update logic from Alr into Alire (#609)

Also add and use a flag to prevent autoupdates.

5 years agoAlire.Environment: load env context from the platform (#608)
Fabien Chouteau [Wed, 4 Nov 2020 20:32:52 +0000 (21:32 +0100)]
Alire.Environment: load env context from the platform  (#608)

* Alire.Environment: sort env list for predictable output

* Alire.Environment: load env context from the platform

For the moment this is only used on Windows for msys2. Before this patch the msys2 env was not included in `alr print` which means that the context was not complete.

* Alr.Platforms.Windows: do not install msys2 if pacman already in PATH

This makes alr usable when the user is already in an msys2 context.
And it alse makes possible to have an alire package in msys2.

5 years agoAlire.Utils.Yaml: fix string escape (#604)
Fabien Chouteau [Wed, 4 Nov 2020 15:43:44 +0000 (16:43 +0100)]
Alire.Utils.Yaml: fix string escape (#604)

We use double-quote strings so single-quotes should not be escaped.

5 years agoReport underlying error during publishing for an unloadable manifest (#602)
Alejandro R Mosteo [Wed, 4 Nov 2020 10:17:44 +0000 (11:17 +0100)]
Report underlying error during publishing for an unloadable manifest (#602)

* Publish: report error causing unloadable manifest

* Testsuite: add test checking proper error output

5 years agoAvoid unneeded requests to approve changes after editing the manifest (#591)
Alejandro R Mosteo [Thu, 29 Oct 2020 10:26:59 +0000 (11:26 +0100)]
Avoid unneeded requests to approve changes after editing the manifest (#591)

* Avoid unneeded requests to update when no changes

Changes in solutions were being spuriously detected, in situations in which
there were no changes. Also, when manual changes didn't affect dependencies,
the situation was not corrected either by manual update or automatic check.

* New test to check the bugfix

5 years agoAlr.Commands.Init: warnings instead of fails for existing files (#599)
Fabien Chouteau [Wed, 28 Oct 2020 19:27:46 +0000 (20:27 +0100)]
Alr.Commands.Init: warnings instead of fails for existing files (#599)

To make this command more usable when converting an existing Ada project
to Alire, existing source or gpr files are now reported as a warning
instead of an error.

5 years agopolicies.md: add best practices (#597)
Fabien Chouteau [Wed, 28 Oct 2020 17:43:03 +0000 (18:43 +0100)]
policies.md: add best practices (#597)

* policies.md: add best practices

* Update policies.md

5 years agoMigration of an existing Ada/SPARK project to Alire (#598)
Fabien Chouteau [Wed, 28 Oct 2020 17:32:23 +0000 (18:32 +0100)]
Migration of an existing Ada/SPARK project to Alire (#598)

* Update getting-started.md

* Update getting-started.md

* Typo

5 years agoGit: Use remote branch when checking remote status (#596)
Alejandro R Mosteo [Tue, 27 Oct 2020 13:58:58 +0000 (14:58 +0100)]
Git: Use remote branch when checking remote status (#596)

Otherwise it seems git defaults to the main branch, which manifested as
spurious "ahead" status, or ambiguous references in local remotes.

5 years agoPublish: Detect missing manifest in remote sources (#595)
Alejandro R Mosteo [Tue, 27 Oct 2020 11:45:31 +0000 (12:45 +0100)]
Publish: Detect missing manifest in remote sources (#595)

This could escape our checks when the alire.toml file was in .gitignore, for
example, so we didn't detect the discrepancy between local and remote sources.

5 years agoChange Windows installer icon (#589)
Fabien Chouteau [Sat, 24 Oct 2020 09:44:48 +0000 (11:44 +0200)]
Change Windows installer icon (#589)

This new version has a white layer for dark background desktop.

5 years agoDo not show an error when no command is given (#588)
Alejandro R Mosteo [Thu, 22 Oct 2020 14:41:31 +0000 (16:41 +0200)]
Do not show an error when no command is given (#588)

5 years agoFix typo when asking for sudo authorization (#586)
Fabien Chouteau [Thu, 22 Oct 2020 08:32:10 +0000 (10:32 +0200)]
Fix typo when asking for sudo authorization (#586)

Fixes #582

5 years agoMore informative error for missing gprbuild (#583)
Alejandro R Mosteo [Thu, 22 Oct 2020 07:55:13 +0000 (09:55 +0200)]
More informative error for missing gprbuild (#583)

5 years agoFix the `depends-on` example in the catalog spec (#581)
Alejandro R Mosteo [Tue, 20 Oct 2020 16:01:21 +0000 (18:01 +0200)]
Fix the `depends-on` example in the catalog spec (#581)

It was using the old table notation.

5 years agoEnvironment: allow to set var twice to the same value (#580)
Alejandro R Mosteo [Tue, 20 Oct 2020 11:11:30 +0000 (13:11 +0200)]
Environment: allow to set var twice to the same value (#580)

This was already intended to work like this, but was buggy.

5 years agodoc/getting-started.md: replace "setenv" with "printenv" (#576)
Pierre-Marie de Rodat [Fri, 16 Oct 2020 18:13:02 +0000 (20:13 +0200)]
doc/getting-started.md: replace "setenv" with "printenv" (#576)

Update after #534

5 years agoAdded paragraph about adding an ALR badge (#574)
Vinzent "Jellix" Saranen [Thu, 15 Oct 2020 14:56:17 +0000 (16:56 +0200)]
Added paragraph about adding an ALR badge (#574)

* Added paragraph about adding an ALR badge

* Incorporated review comments

* Clarified that the website is updated once daily
* Use 'crate' instead of 'project' where appropriate to avoid confusion
* Minor wording changes.

5 years agoSaner defaults for the dependency solver (#573)
Alejandro R Mosteo [Thu, 15 Oct 2020 11:03:18 +0000 (13:03 +0200)]
Saner defaults for the dependency solver (#573)

We were needlessly exploring the whole solution space, even when the best
complete solution had been already found.

5 years agocatalog-format-spec.md: fix gpr-set-externals description (#572)
Fabien Chouteau [Wed, 14 Oct 2020 09:11:36 +0000 (11:11 +0200)]
catalog-format-spec.md: fix gpr-set-externals description (#572)

It should not be used to specify default values.

5 years agoci-windows.yml: fix zip release (#567)
Fabien Chouteau [Tue, 13 Oct 2020 11:58:15 +0000 (13:58 +0200)]
ci-windows.yml: fix zip release (#567)

5 years agoUpdate ci-linux.yml (#563)
Fabien Chouteau [Fri, 9 Oct 2020 15:58:10 +0000 (17:58 +0200)]
Update ci-linux.yml (#563)

* Update ci-linux.yml

Switch Linux CI to GitHub Ubuntu-18.04

* Update ci-linux.yml

* Update ci-linux.yml

Going back to GNAT community as GNAT-7 on Ubuntu-18.04 is not working.

5 years agoMove docker CI tests to its own workflow (#565)
Alejandro R Mosteo [Fri, 9 Oct 2020 15:47:51 +0000 (17:47 +0200)]
Move docker CI tests to its own workflow (#565)

Also remove obsolete env. var. BRANCH no longer needed as we no longer test the
old installer in this workflow.

5 years agoSwitch from devel- to stable- index branch (#566)
Alejandro R Mosteo [Fri, 9 Oct 2020 15:47:13 +0000 (17:47 +0200)]
Switch from devel- to stable- index branch (#566)

5 years agoreviewed for English grammar, spelling, etc. (#561)
Pat Rogers [Fri, 9 Oct 2020 07:44:22 +0000 (02:44 -0500)]
reviewed for English grammar, spelling, etc. (#561)

5 years agoSpelling fixes and README update (#559)
Alejandro R Mosteo [Thu, 8 Oct 2020 13:25:31 +0000 (15:25 +0200)]
Spelling fixes and README update (#559)

* Getting started: spelling fixes

* README: add beta info and build instructions

5 years agoUpdate getting-started with install from binary distribution (#558)
Fabien Chouteau [Tue, 6 Oct 2020 18:58:37 +0000 (20:58 +0200)]
Update getting-started with install from binary distribution (#558)

5 years agoUse GitHub API for basic checks/info during publishing (#554)
Alejandro R Mosteo [Tue, 6 Oct 2020 13:58:22 +0000 (15:58 +0200)]
Use GitHub API for basic checks/info during publishing (#554)

* Use GitHub API for basic checks/info during publish

* Code review fix

* Fix: new config values unavailable during same run

New config entries were stored on disk but not added to the memory map. As the
Config.Set subprogram isn't aware of the level of configuration being set,
there is no direct way to both store to disk and to memory; instead the
solution is that the configuration is reloaded every time. This is a bit of
overkill and a candidate for later optimization.

5 years agoFix `alr test` help info on default docker (#557)
Alejandro R Mosteo [Mon, 5 Oct 2020 18:37:35 +0000 (20:37 +0200)]
Fix `alr test` help info on default docker (#557)

5 years agoAlr.Platforms.Windows: download msys2 from GitHub releases (#556)
Fabien Chouteau [Mon, 5 Oct 2020 11:46:58 +0000 (13:46 +0200)]
Alr.Platforms.Windows: download msys2 from GitHub releases (#556)

* Alr.Platforms.Windows: download msys2 from GitHub releases

With the hope that GitHub servers are more reliable.

* Fix style

5 years agoCreate and upload assets to alr releases (#551)
Alejandro R Mosteo [Thu, 1 Oct 2020 17:26:48 +0000 (19:26 +0200)]
Create and upload assets to alr releases (#551)

* Upload artifacts as assets to releases

* Remove obsolete workflow attempt

5 years agoCreate binary artifact on Linux/macOS (#549)
Alejandro R Mosteo [Thu, 1 Oct 2020 10:08:34 +0000 (12:08 +0200)]
Create binary artifact on Linux/macOS (#549)

5 years agoGather user info during `alr init` for manifest creation (#548)
Alejandro R Mosteo [Tue, 29 Sep 2020 09:17:06 +0000 (11:17 +0200)]
Gather user info during `alr init` for manifest creation (#548)

* Init: fill defaults with user-provided info

* Code review fixes

5 years agoAdd default executable property in `alr init --bin` (#547)
Alejandro R Mosteo [Mon, 28 Sep 2020 11:29:50 +0000 (13:29 +0200)]
Add default executable property in `alr init --bin` (#547)

5 years agoAlire.Utils.User_Input: add function to query user's name, email and GitHub login...
Fabien Chouteau [Mon, 28 Sep 2020 11:29:28 +0000 (13:29 +0200)]
Alire.Utils.User_Input: add function to query user's name, email and GitHub login (#461)

* Alire.Utils.User_Input: add function to query user's name, email and github login

* Break circular elaboration issue

Since Config uses Utils.User_Input indirectly via Deplyers.System, a
possibility is to move new User_Input functions that need Config into a new
package.

Co-authored-by: Alejandro R. Mosteo <amosteo@unizar.es>
5 years agoRemove linux installer script (#546)
Alejandro R Mosteo [Fri, 25 Sep 2020 15:04:00 +0000 (17:04 +0200)]
Remove linux installer script (#546)

5 years agoAlr.Commands: new Edit command (#545)
Fabien Chouteau [Fri, 25 Sep 2020 15:03:36 +0000 (17:03 +0200)]
Alr.Commands: new Edit command (#545)

* Alr.Commands: new Edit command

For the moment it opens GNATstudio within the Alire context.

* Alr.Commands.Init: add Create_Missing_Dirs

So the build won't fail if -p is not used with gprbuild.

* Fix test description

* testsuite/tests/workflows/edit: fix test when GNATstudio not in PATH

5 years agoAlr.Commands.Init: add or append to .gitignore (#544)
Fabien Chouteau [Fri, 25 Sep 2020 14:11:24 +0000 (16:11 +0200)]
Alr.Commands.Init: add or append to .gitignore (#544)

5 years agoCreate tarball from Alire workspace (#529)
Alejandro R Mosteo [Fri, 25 Sep 2020 14:10:02 +0000 (16:10 +0200)]
Create tarball from Alire workspace (#529)

* Create tarball from alire workspace

* Tests for tarball creation

* Code review fixes

* Workaround for macOS BSD tar

* Document `alr publish --tar` changes.

* Fix tar regular expr and improve related test

It seems GNAT's Normalize_Arguments does its own escaping, so we do not need to
do it ourselves. Also, the test checks that indeed the `alire` folder is
excluded when tar'ing manually.

5 years agoAlire.Release: print crate name in loading error messages (#541)
Fabien Chouteau [Fri, 25 Sep 2020 07:28:11 +0000 (09:28 +0200)]
Alire.Release: print crate name in loading error messages (#541)

5 years agoBump ada-toml to v0.2 (#539)
Fabien Chouteau [Thu, 24 Sep 2020 10:04:18 +0000 (12:04 +0200)]
Bump ada-toml to v0.2 (#539)

This release includes various parser fixes.

5 years agoactions: rename post-compile into post-build and add pre-build (#537)
Fabien Chouteau [Wed, 23 Sep 2020 13:55:04 +0000 (15:55 +0200)]
actions: rename post-compile into post-build and add pre-build (#537)

5 years agoTool and library version number (#536)
Fabien Chouteau [Wed, 23 Sep 2020 09:59:05 +0000 (11:59 +0200)]
Tool and library version number (#536)

* Tool and library version number

* Bump version to 0.7.0

5 years agoFix bug in external detection from version (#535)
Alejandro R Mosteo [Mon, 21 Sep 2020 09:13:30 +0000 (11:13 +0200)]
Fix bug in external detection from version (#535)

We failed if the executable was not found, but this is expected and simply
means the external is not available.

5 years agoalr init usability tweaks (#533)
Fabien Chouteau [Fri, 18 Sep 2020 12:03:36 +0000 (14:03 +0200)]
alr init usability tweaks (#533)

* Alr.Commands.Init: usability tweaks

This change makes the alr init --in-place generate a project skeleton.

This is to support the workflow:
 - Create repo on GitHub
 - Clone repo
 - cd repo
 - alr init --bin --in-place my_project

 Which was impossible to do before.

* Alr.Commands.Init: remove superfluous code

* Alr.Commands.Init: --in-place doesn't imply --no-skel

5 years agoAlr.Commands: rename setenv into printenv (#534)
Fabien Chouteau [Fri, 18 Sep 2020 11:04:55 +0000 (13:04 +0200)]
Alr.Commands: rename setenv into printenv (#534)

The command is actually not setting the environment but printing it.

5 years agoTweaks for detection of git URLs (#530)
Alejandro R Mosteo [Tue, 15 Sep 2020 15:28:55 +0000 (17:28 +0200)]
Tweaks for detection of git URLs (#530)

* Transform private repo URL into public one

For fetching from github, it is safe to do this transformation, whereas users
working with the repo may find more convenient the use of private git@ URLs.

* Detect github URLs missing a trailing ".git"

* Testsuite: more cases for git remotes

* Allow controlling the git@ -> https:// transformation

* Generalize checks beyond github

* Unit test for Alire.VCSs.Git.Transform_To_Public

5 years agoalr init: add compiler option controls to template project (#523)
Fabien Chouteau [Mon, 14 Sep 2020 16:19:05 +0000 (18:19 +0200)]
alr init: add compiler option controls to template project (#523)

* alr init: add compiler option controls to template project

User can control compile checks, run-time checks, contracts, style
checks.

* Testsuite: fix Ada coding style in tests

* Alr.Commands.Init: use UNIX line ending on all generated source code

To pass default GNAT style checks.

* Update alr-commands-init.adb

Alr.Commands.Init: fix line ending by using file IO binary mode

* Alr.Commands.Init: rever line ending changes and just remove the check

Git is messing with line ending on Windows so trying to produce UNIX files is more difficult than planned.

Instead the DOS line terminator style check is disabled.

5 years agoPublish tweaks (#528)
Fabien Chouteau [Mon, 14 Sep 2020 16:10:47 +0000 (18:10 +0200)]
Publish tweaks (#528)

* Alire.Publish: use error message similar to the git messages

* Alire.Publish: Do not print repo path if using CWD

* Alire.VCSs.Git: change status detection

Untracked files are ignored like git does.

* Alr.Commands.Publish: remove --prepare switch

Since there is no other publish mode.

* testsuite/tests/publish/local-repo: update expected output

5 years agoMerge publishing assistant PRs into master (#527)
Alejandro R Mosteo [Mon, 14 Sep 2020 10:25:41 +0000 (12:25 +0200)]
Merge publishing assistant PRs into master (#527)

Merge publishing assistant PRs into master

5 years agoUpdated documentation for new `alr publish` (#524)
Alejandro R Mosteo [Mon, 14 Sep 2020 10:11:07 +0000 (12:11 +0200)]
Updated documentation for new `alr publish` (#524)

* Document the new `alr publish` workflow

* Review changes

5 years agoAdded `user-changes.md` log for new `publish` feat
Alejandro R. Mosteo [Mon, 14 Sep 2020 09:46:31 +0000 (11:46 +0200)]
Added `user-changes.md` log for new `publish` feat

And spellcheck fixes

5 years ago--skip-build switch to skip the publish build check (#526)
Alejandro R Mosteo [Sat, 12 Sep 2020 17:02:01 +0000 (19:02 +0200)]
--skip-build switch to skip the publish build check (#526)

5 years agoUse local repository as reference for publishing (#519)
Alejandro R Mosteo [Sat, 12 Sep 2020 12:21:40 +0000 (14:21 +0200)]
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.

5 years agoTest build the publishing release (#517)
Alejandro R Mosteo [Sat, 12 Sep 2020 12:06:37 +0000 (14:06 +0200)]
Test build the publishing release (#517)

* Test build the release

* Test that failing build is reported

* Fix zipping helper in testsuite

The extra indirection level was not required, as os.walk already gives us the
proper paths we need. This wasn't detected until we tried to build an unzipped
release zipped by ourselves.