First approach
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
# Object file
|
||||
# Object files
|
||||
obj
|
||||
*.o
|
||||
|
||||
# Ada Library Information
|
||||
|
||||
@@ -1,3 +1,31 @@
|
||||
project Alire_Index is
|
||||
with "semantic_versioning.gpr";
|
||||
|
||||
project Alire is
|
||||
|
||||
for Source_Dirs use ("index", "src");
|
||||
for Object_Dir use "obj";
|
||||
for Library_Name use "alire";
|
||||
for Library_Dir use "lib";
|
||||
|
||||
package Pretty_Printer is
|
||||
for Switches ("ada") use ("--no-separate-is");
|
||||
end Pretty_Printer;
|
||||
|
||||
package Builder is
|
||||
for Switches ("ada") use ("-s", "-m", "-j0", "-g");
|
||||
end Builder;
|
||||
|
||||
package Compiler is
|
||||
for Switches ("ada") use ("-gnatwa", "-gnatVa", "-g", "-O2", "-gnat12", "-gnato", "-fstack-check", "-gnata");
|
||||
end Compiler;
|
||||
|
||||
package Binder is
|
||||
for Switches ("ada") use ("-E", "-shared");
|
||||
end Binder;
|
||||
|
||||
package Ide is
|
||||
for Vcs_Kind use "Git";
|
||||
end Ide;
|
||||
|
||||
end Alire;
|
||||
|
||||
end Alire_Index;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package Alire.Index.Hello is
|
||||
|
||||
Hello : constant Project := Git_Project ("hello",
|
||||
"git@bitbucket.org:aleteolabs/hello.git");
|
||||
|
||||
V_1_0_0 : constant Milestone := Register (Git_Release (
|
||||
Hello,
|
||||
V ("1.0.0"),
|
||||
"8cac0afddc505794ae3e5634745ce0830129d241"));
|
||||
|
||||
end Alire.Index.Hello;
|
||||
@@ -0,0 +1,11 @@
|
||||
package Alire.Index.Libhello is
|
||||
|
||||
Libhello : constant Project := Git_Project ("libhello",
|
||||
"git@bitbucket.org:aleteolabs/libhello.git");
|
||||
|
||||
V_1_0_0 : constant Milestone := Register (Git_Release (
|
||||
Libhello,
|
||||
V ("1.0.0"),
|
||||
"ce78e7706c9d3f97605df48d8befca5407f8d328"));
|
||||
|
||||
end Alire.Index.Libhello;
|
||||
@@ -0,0 +1,38 @@
|
||||
with Alire.Repositories.Git;
|
||||
|
||||
with Semantic_Versioning;
|
||||
|
||||
package Alire.Index with Preelaborate is
|
||||
|
||||
type Milestone (<>) is private;
|
||||
|
||||
function Register (Released : Release;
|
||||
Depends_On : Dependencies := Nothing) return Milestone;
|
||||
-- General registering function
|
||||
|
||||
|
||||
|
||||
-- SHORTCUTS TO SIMPLIFY INDEX ENTRIES REGISTRATION --
|
||||
|
||||
function V (Semantic_Version : String) return Semantic_Versioning.Version renames Semantic_Versioning.New_Version;
|
||||
|
||||
|
||||
|
||||
function Git_Project (Name : Project_Name; Git_URL : String) return Project;
|
||||
|
||||
function Git_Release (Prj : Project;
|
||||
Version : Semantic_Versioning.Version;
|
||||
Commit : Repositories.Git.Commit_ID) return Release;
|
||||
|
||||
function Register_Git_Milestone (Name : Project_Name;
|
||||
Version : Semantic_Versioning.Version;
|
||||
Git_URL : String;
|
||||
Commit : Repositories.Git.Commit_ID;
|
||||
Depends_On : Dependencies := Nothing) return Milestone;
|
||||
-- Single git releases
|
||||
|
||||
private
|
||||
|
||||
type Milestone is null record;
|
||||
|
||||
end Alire.Index;
|
||||
@@ -0,0 +1,15 @@
|
||||
package Alire.Repositories.Git with Preelaborate is
|
||||
|
||||
type Repository (<>) is new Repositories.Repository with private;
|
||||
|
||||
subtype Commit_ID is String (1 .. 40);
|
||||
|
||||
function New_Git_Repo (URL : String) return Repository;
|
||||
|
||||
private
|
||||
|
||||
type Repository (URL_Length : Natural) is new Repositories.Repository with record
|
||||
URL : String (1 .. URL_Length);
|
||||
end record;
|
||||
|
||||
end Alire.Repositories.Git;
|
||||
@@ -0,0 +1,7 @@
|
||||
package Alire.Repositories with Preelaborate is
|
||||
|
||||
type Repository is interface;
|
||||
|
||||
type Commit_ID is new String;
|
||||
|
||||
end Alire.Repositories;
|
||||
@@ -0,0 +1,50 @@
|
||||
limited with Alire.Repositories;
|
||||
|
||||
with Semantic_Versioning;
|
||||
|
||||
package Alire with Preelaborate is
|
||||
|
||||
type Project (<>) is private;
|
||||
-- A name + Storage location
|
||||
|
||||
type Project_Name is new String;
|
||||
|
||||
function New_Project (Name : Project_Name;
|
||||
Repo : Repositories.Repository'Class) return Project;
|
||||
|
||||
|
||||
|
||||
type Release (<>) is private;
|
||||
|
||||
function New_Release (Prj : Project;
|
||||
Version : Semantic_Versioning.Version;
|
||||
Commit : Repositories.Commit_ID) return Release;
|
||||
|
||||
|
||||
|
||||
type Dependency (<>) is private;
|
||||
|
||||
type Dependencies (<>) is private;
|
||||
|
||||
Nothing : constant Dependencies;
|
||||
|
||||
function New_Dependency (Name : Project_Name; Versions : Semantic_Versioning.Version_Set) return Dependency;
|
||||
|
||||
function "and" (Dep1, Dep2 : Dependency) return Dependencies;
|
||||
function "and" (Deps : Dependencies; Dep : Dependency) return Dependencies;
|
||||
|
||||
private
|
||||
|
||||
type Dependency is null record;
|
||||
|
||||
type Dependencies is null record;
|
||||
|
||||
Nothing : constant Dependencies := (null record);
|
||||
|
||||
type Project is null record;
|
||||
|
||||
type Release is null record;
|
||||
|
||||
type Release_Set is null record;
|
||||
|
||||
end Alire;
|
||||
Reference in New Issue
Block a user