Skip to content

Commit 96fa6f5

Browse files
committed
<Make> improved
1 parent c9a05cf commit 96fa6f5

File tree

5 files changed

+50
-1046
lines changed

5 files changed

+50
-1046
lines changed

APLSource/Admin/Make.aplf

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,56 @@
1-
Make flag;M;C;path;zipFilename;res;version;cfg;parms
2-
⍝ "Make" a new version of this project
1+
{r}←{refToMakeHelpers}Make flag;M;C;path;zipFilename;res;parms;cfg;noOf;answer;q
2+
⍝ "Make"s this projects.
3+
⍝ You may pass a ref pointing to `MakeHelpers` as `⍺`.
4+
⍝ If you don't, the function checks whether it's available in `⎕SE`.
5+
⍝ If it is, the user is asked whether she wants to use that.
6+
⍝ If she refuses or if it's not available in `⎕SE`, then the function
7+
⍝ attempts to load the package into `⎕SE` with ]Tatin.LoadPackages.
8+
⍝ Returns 1 in case a new version was created and 0 otherwise.
9+
r←0
310
:If flag
4-
M←⎕SE.MakeHelpers
11+
:Section ⍝ Establish ref to "MakeHelpers"
12+
:If 0=⎕NC'refToMakeHelpers'
13+
:If 9=⎕SE.⎕NC'MakeHelpers'
14+
flag←¯1
15+
:Repeat
16+
answer←⍞,0/⍞←q←'Do you want to use "MakeHelpers" ',⎕SE.MakeHelpers.Version,' in ⎕SE (n=re-load) (Y/n)?'
17+
answer←(≢q)↓answer
18+
:If 0=≢answer
19+
:OrIf 'Yy'∊⍨¯1↑answer
20+
flag←1
21+
:ElseIf 'Nn'∊⍨¯1↑answer
22+
flag←0
23+
:EndIf
24+
:Until flag∊0 1
25+
:If flag
26+
M←⎕SE.MakeHelpers
27+
:Else
28+
noOf←⎕SE.Tatin.LoadPackages'MakeHelpers'⎕SE
29+
'Could not load the package "MakeHelpers"'⎕SIGNAL 6/⍨0=noOf
30+
M←⎕SE.MakeHelpers
31+
:EndIf
32+
:Else
33+
noOf←⎕SE.Tatin.LoadPackages'MakeHelpers'⎕SE
34+
'Could not load the package "MakeHelpers"'⎕SIGNAL 6/⍨0=noOf
35+
M←⎕SE.MakeHelpers
36+
:EndIf
37+
:Else
38+
M←refToMakeHelpers
39+
:EndIf
40+
:EndSection
41+
⎕←'Using "MakeHelpers" version ',⎕SE.MakeHelpers.Version
542
C←##.CiderConfig
43+
⎕←'' ⋄ 0 0⍴⍞,0/⍞←'Pause sync services like Dropbox, Google Drive etc. in order to avoid FILE ACCESS errors. Press <enter> to continue '
44+
:If ⎕NULL≡cfg←M.EditPackageConfigFile ##.TatinVars
45+
⎕←'Cancelled by user' ⋄ →0
46+
:EndIf
647
path←C.HOME,'/',C.CIDER.distributionFolder
7-
cfg←⎕JSON⍠('Dialect' 'JSON5')⊢⊃⎕NGET C.HOME,'/apl-package.json'
8-
version←M.CompileVersionNumberPattern cfg
948
M.RecreateFolder path
1049
parms←⎕SE.Tatin.CreateBuildParms C.HOME
11-
parms.targetPath←path
12-
parms.version←version
50+
parms.targetPath←C.CIDER.distributionFolder
51+
parms.version←cfg.version
1352
zipFilename←⎕SE.Tatin.BuildPackage parms
14-
⎕←'*** New version build successfully:',M.CR,' ',zipFilename
53+
⎕←'*** New version built successfully:',M.CR,' ',zipFilename
54+
r←1
1555
:EndIf
16-
⍝Done
56+
⍝Done

TestResults/CodeCoverage.cr

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)