-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run delayed post-fetch actions during build (#1441)
* Refactored flags into new crate * Delay post-fetch to first build (ensures complete env) * Folderize flags * Self-review * Simpler flag use, better encapsulation * Fix Windows-only test
- Loading branch information
Showing
29 changed files
with
290 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
with AAA.Strings; | ||
|
||
with Alire.Directories; | ||
with Alire.Paths; | ||
|
||
package body Alire.Flags is | ||
|
||
use Directories.Operators; -- "/" | ||
|
||
-------------- | ||
-- New_Flag -- | ||
-------------- | ||
|
||
function New_Flag (Name : Names; | ||
Base : Absolute_Path) | ||
return Flag | ||
is (Diskflags.New_Flag | ||
(Diskflags.Some_Path | ||
(Base | ||
/ Paths.Working_Folder_Inside_Root | ||
/ Paths.Flags_Folder_Inside_Working_Folder | ||
/ AAA.Strings.To_Lower_Case (Name'Image)))); | ||
|
||
end Alire.Flags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
with Diskflags; | ||
|
||
package Alire.Flags is | ||
|
||
-- Flags are empty files we store under the workspace's alire directory to | ||
-- signal that some operation has succeeded. | ||
|
||
subtype Flag is Diskflags.Flag; | ||
|
||
-- All following `Base` paths point to a release top-dir, not necessarily | ||
-- to a workspace's root. | ||
|
||
function Complete_Copy (Base : Absolute_Path) return Flag; | ||
-- Signals that a release deployment has completed successfully | ||
|
||
function Post_Fetch (Base : Absolute_Path) return Flag; | ||
-- Signals that post-fetch has been run for the release | ||
|
||
private | ||
|
||
-- The following names directly translate into lowercase filenames | ||
type Names is | ||
(Complete_Copy, | ||
Post_Fetch_Done); | ||
|
||
function New_Flag (Name : Names; | ||
Base : Absolute_Path) | ||
return Flag; | ||
-- Base refers to the top-dir of any release, not necessarily a workspace | ||
-- root. | ||
|
||
function Complete_Copy (Base : Absolute_Path) return Flag | ||
is (New_Flag (Complete_Copy, Base)); | ||
|
||
function Post_Fetch (Base : Absolute_Path) return Flag | ||
is (New_Flag (Post_Fetch_Done, Base)); | ||
|
||
end Alire.Flags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.