Milestone Image
This commit is contained in:
@@ -2,12 +2,18 @@ with Ada.Containers.Indefinite_Holders;
|
||||
with Ada.Containers.Indefinite_Ordered_Maps;
|
||||
with Ada.Containers.Indefinite_Ordered_Sets;
|
||||
|
||||
with Alire.Milestones;
|
||||
with Alire.Releases;
|
||||
|
||||
with Semantic_Versioning;
|
||||
|
||||
package Alire.Containers with Preelaborate is
|
||||
|
||||
package Milestone_Sets is new Ada.Containers.Indefinite_Ordered_Sets (Milestones.Milestone,
|
||||
Milestones."<",
|
||||
Milestones."=");
|
||||
|
||||
|
||||
package Release_Sets is new Ada.Containers.Indefinite_Ordered_Sets (Releases.Release,
|
||||
Releases."<",
|
||||
Releases."=");
|
||||
|
||||
@@ -13,6 +13,8 @@ package Alire.Milestones with Preelaborate is
|
||||
|
||||
function Version (M : Milestone) return Semantic_Versioning.Version;
|
||||
|
||||
function Image (M : Milestone) return String;
|
||||
|
||||
private
|
||||
|
||||
type Milestone (Name_Len : Positive) is tagged record
|
||||
@@ -33,4 +35,7 @@ private
|
||||
|
||||
function Version (M : Milestone) return Semantic_Versioning.Version is (M.Version);
|
||||
|
||||
function Image (M : Milestone) return String is
|
||||
(M.Project & "=" & Image (M.Version));
|
||||
|
||||
end Alire.Milestones;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
with Alire.Dependencies.Vectors;
|
||||
with Alire.Milestones;
|
||||
with Alire.Origins;
|
||||
with Alire.Properties;
|
||||
with Alire.Requisites;
|
||||
@@ -34,6 +35,8 @@ package Alire.Releases with Preelaborate is
|
||||
-- Unique string built as name-version-id
|
||||
function Unique_Folder (R : Release) return String renames Image;
|
||||
|
||||
function Milestone (R : Release) return Milestones.Milestone;
|
||||
|
||||
function Milestone_Image (R : Release) return String;
|
||||
-- project=version string
|
||||
|
||||
@@ -89,9 +92,12 @@ private
|
||||
function Version (R : Release) return Semantic_Versioning.Version is (R.Version);
|
||||
function Depends (R : Release) return Dependencies is (R.Depends_On);
|
||||
function Origin (R : Release) return Origins.Origin is (R.Origin);
|
||||
|
||||
function Milestone (R : Release) return Milestones.Milestone is
|
||||
(Milestones.New_Milestone (R.Name, R.Version));
|
||||
|
||||
function Is_Native (R : Release) return Boolean is (R.Native);
|
||||
|
||||
function Is_Native (R : Release) return Boolean is (R.Native);
|
||||
|
||||
-- FIXME: this should be OS-sanitized to be a valid path
|
||||
function Image (R : Release) return String is
|
||||
(R.Project & "_" &
|
||||
@@ -99,10 +105,6 @@ private
|
||||
(if R.Origin.Id'Length <= 8 then R.Origin.Id
|
||||
else R.Origin.Id (R.Origin.Id'First .. R.Origin.Id'First + 7)));
|
||||
|
||||
function Milestone_Image (R : Release) return String is
|
||||
(R.Project & "=" & Image (R.Version));
|
||||
|
||||
-- function Repo_Image (R : Release) return String is
|
||||
-- (R.Repository.Element.Image);
|
||||
function Milestone_Image (R : Release) return String is (R.Milestone.Image);
|
||||
|
||||
end Alire.Releases;
|
||||
|
||||
Reference in New Issue
Block a user