├── .gitattributes ├── .gitignore ├── APLSource ├── Main-1 │ ├── APIFunctionNames-80f.aplf │ ├── APLVersion-f.aplf │ ├── About-1.aplf │ ├── AddDependency-9.aplf │ ├── AddRemote-9.aplf │ ├── AddTokenToURL-1d09.aplf │ ├── BootStrapBuild-211.aplf │ ├── Build-1.aplf │ ├── BuildAPI-e1.aplf │ ├── BuildListFunction-221.aplf │ ├── BuildNSS-e1.aplf │ ├── BuildNamespace-21.aplf │ ├── BuildScript_-21.aplf │ ├── BuildUCMDFile-3e1.aplf │ ├── BuildWorkspace-21.aplf │ ├── BuildWorkspace_-21.aplf │ ├── CheckAPLVersion-1e1.aplf │ ├── Checkout-1.aplf │ ├── CheckoutMaster-101.aplf │ ├── Commit-1.aplf │ ├── ComputeCaseCode-881.aplf │ ├── CopyPackage-11.aplf │ ├── CopyProject-11.aplf │ ├── CopyUserCommandFile-8111.aplf │ ├── CreateNewVersion-241.aplf │ ├── CreateProject-41.aplf │ ├── DecodeCaps-41.aplf │ ├── DecodeOctalEncoding-841.aplf │ ├── DefaultParameter-81.aplf │ ├── DeleteBranch-41.aplf │ ├── DeleteDevFolders-241.aplf │ ├── DeleteDevSpaceFolders-4241.aplf │ ├── DeleteDevSpaces-241.aplf │ ├── DeleteGitItems-241.aplf │ ├── DependencyError-401.aplf │ ├── DependencyReport-401.aplf │ ├── DependencyState-401.aplf │ ├── DownloadProject-101.aplf │ ├── EnhanceAcreConfig-881.aplf │ ├── Execute-1.aplf │ ├── ExecuteAPL-381.aplf │ ├── ExecuteOnBuild-281.aplf │ ├── ExecuteOnBuild_-281.aplf │ ├── ExistingAncestor-101.aplf │ ├── ExpandProjectPath-2041.aplf │ ├── Fetch-1.aplf │ ├── FileNameToItemName-4511.aplf │ ├── FileNamesToItemNames-8a11.aplf │ ├── FixPath-9.aplf │ ├── FormatConfigSpace-1041.aplf │ ├── FormatStatus-41.aplf │ ├── FormatTable-41.aplf │ ├── FormatVersion-41.aplf │ ├── GUID-f.aplf │ ├── GenerateApplicationNotes-80101.aplf │ ├── GenerateManifest-101.aplf │ ├── GeneratePackageNotes-8101.aplf │ ├── GenerateReleaseNotes-8101.aplf │ ├── Get-1.aplf │ ├── GetAPISpace-79.aplf │ ├── GetAppPackFolder-449.aplf │ ├── GetApplicationFolder-4009.aplf │ ├── GetBuildID-309.aplf │ ├── GetCommitDate-209.aplf │ ├── GetCommits-9.aplf │ ├── GetConfigSpace-209.aplf │ ├── GetCurrentBranch-409.aplf │ ├── GetDyalogVersionFolder-10209.aplf │ ├── GetFileName-89.aplf │ ├── GetFullyQualifiedItemName-220109.aplf │ ├── GetGithubToken-209.aplf │ ├── GetHistory-9.aplf │ ├── GetIncludeInApplicationNotes-801409.aplf │ ├── GetInjectionInfo-1009.aplf │ ├── GetLastReleaseDate-4089.aplf │ ├── GetNextVersion-89.aplf │ ├── GetPackageVersions-409.aplf │ ├── GetProjectFolder-409.aplf │ ├── GetProjectSpace-409.aplf │ ├── GetReleaseArtifactsFolder-80409.aplf │ ├── GetRemoteTags-209.aplf │ ├── GetShortHash-109.aplf │ ├── GetStartupEnvironmentVariables-200409.aplf │ ├── GetTags-9.aplf │ ├── GetTempDir-89.aplf │ ├── GitHubCreateRelease-1049.aplf │ ├── GitHubReleaseUploadAsset-82049.aplf │ ├── GroupAndName-121.aplf │ ├── Initialize-1.aplf │ ├── InstallUCMD-781.aplf │ ├── IsDirty-5.aplf │ ├── IsNetCore-25.aplf │ ├── IsRebased-5.aplf │ ├── IsSquashed-5.aplf │ ├── LoadApplication-11.aplf │ ├── Log-1.aplf │ ├── ManifestEntry-101.aplf │ ├── MergeFeatureBranch-1021.aplf │ ├── NStoScript-13.aplf │ ├── NewFeatureBranch-409.aplf │ ├── NewReleaseBranch-409.aplf │ ├── OnSessionStart-205.aplf │ ├── OpenOrLoad-51.aplf │ ├── OpenProject-11.aplf │ ├── PackageFQP-381.aplf │ ├── ProcessFileLine-881.aplf │ ├── ProcessLog-81.aplf │ ├── ProcessOpenArg-881.aplf │ ├── ProcessPackageNotes-4081.aplf │ ├── ProjectFolder-81.aplf │ ├── ProjectSpace-81.aplf │ ├── Provanto-1.apln │ ├── PullMaster-11.aplf │ ├── Push-1.aplf │ ├── PushMaster-11.aplf │ ├── QuadAT-31.aplf │ ├── REFS-f.aplf │ ├── ReadConfigFile-411.aplf │ ├── RebaseContinue-41.aplf │ ├── RebaseFeatureBranch-2041.aplf │ ├── RefreshProject-81.aplf │ ├── ReleaseNewVersion-481.aplf │ ├── ReleaseOldPatch-481.aplf │ ├── ReleaseOnGitHub-1281.aplf │ ├── RemoveDevelopmentPackages-20041.aplf │ ├── ResolveVersion-81.aplf │ ├── Restore-1.aplf │ ├── Retrieve-1.aplf │ ├── RetrieveDependencies-101.aplf │ ├── RetrieveDependency-101.aplf │ ├── RetrieveLocalProjects-2101.aplf │ ├── RollbackMaster-101.aplf │ ├── Run-1.aplf │ ├── RunGitCommand-49.aplf │ ├── RunGitCommand_OLD-1c049.aplf │ ├── RunProcess-9.aplf │ ├── RunProcessTest-409.aplf │ ├── RunTests-9.aplf │ ├── SetAcreConfig-89.aplf │ ├── SetAttributes-9.aplf │ ├── SetConfigParam-209.aplf │ ├── SetQuadLX-189.aplf │ ├── SetReference-9.aplf │ ├── SetReferences-9.aplf │ ├── SetupApplication-21.aplf │ ├── SetupWorkspace-21.aplf │ ├── ShowBranches-11.aplf │ ├── ShowChanges-11.aplf │ ├── ShowCommitDetail-411.aplf │ ├── ShowCommitSummary-411.aplf │ ├── ShowHistory-11.aplf │ ├── ShowProjects-11.aplf │ ├── ShowTags-11.aplf │ ├── SourceCode-41.aplf │ ├── SpaceToFolder-a1.aplf │ ├── Squash-1.aplf │ ├── StartApplication-21.aplf │ ├── Status-1.aplf │ ├── ToLowerCase-85.aplf │ ├── UnscriptableFunctions-1001.aplf │ ├── Version-1.aplf │ ├── WriteGitAttributes-121.aplf │ ├── WriteGitIgnore-121.aplf │ ├── Zip-1.aplf │ ├── box-0.aplf │ ├── dlb-0.aplf │ ├── nget-0.aplf │ ├── nput-0.aplf │ ├── nputJSON-f0.aplf │ ├── popspace-0.aplf │ └── refs-0.aplf ├── QuadLX-31.aplf ├── QuadVariables-11.apln ├── Tests-1 │ ├── DeleteTempFolder-441.aplf │ ├── GetTempFolder-89.aplf │ ├── Reset-1.aplf │ ├── TestBuildNSS-e11.aplf │ ├── TestCircularDependencies-1011.aplf │ └── TestDependencies-11.aplf └── UCMD-f │ ├── Help-1.aplf │ ├── List-1.aplf │ └── Run-1.aplf ├── Assets └── Runtime │ ├── acre.dws │ └── acre.dyalog ├── LICENSE ├── README.md ├── ReleaseNotes.md └── acre.config /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | *.apl? linguist-language=APL 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .acre/ 2 | dist/ 3 | temp/ -------------------------------------------------------------------------------- /APLSource/Main-1/APIFunctionNames-80f.aplf: -------------------------------------------------------------------------------- 1 | APIFunctionNames←{ 2 | c←⊂'AddRemote' 3 | c,←⊂'About' 4 | c,←⊂'Build' 5 | c,←⊂'Commit' 6 | c,←⊂'CreateProject' 7 | c,←⊂'Checkout' 8 | c,←⊂'CheckoutMaster' 9 | c,←⊂'DeleteBranch' 10 | c,←⊂'DependencyReport' 11 | c,←⊂'NewFeatureBranch' 12 | c,←⊂'MergeFeatureBranch' 13 | c,←⊂'PushMaster' 14 | c,←⊂'PullMaster' 15 | c,←⊂'ReleaseNewVersion' 16 | c,←⊂'RebaseFeatureBranch' 17 | c,←⊂'RebaseContinue' 18 | c,←⊂'RunGitCommand' 19 | c,←⊂'RunTests' 20 | c,←⊂'ShowBranches' 21 | c,←⊂'ShowCommitSummary' 22 | c,←⊂'ShowCommitDetail' 23 | c,←⊂'SourceCode' 24 | c,←⊂'ShowChanges' 25 | c,←⊂'ShowHistory' 26 | c,←⊂'ShowProjects' 27 | c,←⊂'ShowTags' 28 | c,←⊂'Version' 29 | c,←⊂'OpenProject' 30 | c 31 | } 32 | -------------------------------------------------------------------------------- /APLSource/Main-1/APLVersion-f.aplf: -------------------------------------------------------------------------------- 1 | ns←APLVersion;⎕ML;ver 2 | ⍝ Trad fun 10-15% faster than wrapping in dFN 3 | :If 0=⎕NC'_aplVersion' 4 | ⎕ML←3 5 | ver←'.'⎕WG'APLVersion' 6 | (_aplVersion ns)←⎕NS'' 7 | ns.Bit64←'64'≡¯2↑0⊃ver 8 | ns.OS←ns.Bit64{⍺:¯3↓⍵ ⋄ ⍵}0⊃ver 9 | ns.BuildID←1⊃ver 10 | ns.Runtime←'Runtime'≡3⊃ver 11 | ns.Build←1⊃'.'⎕VFI 1⊃ver 12 | ns.Version←2↑ns.Build 13 | :EndIf 14 | ns←_aplVersion 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/About-1.aplf: -------------------------------------------------------------------------------- 1 | About←{ 2 | ##.QuadLX 0 3 | } 4 | -------------------------------------------------------------------------------- /APLSource/Main-1/AddDependency-9.aplf: -------------------------------------------------------------------------------- 1 | AddDependency←{ 2 | ⍝ ⍺ ←→ ProjectFolder / Space 3 | ⍝ ⍵ ←→ ns | URL, Version, Alias, Inject 4 | ⍺←0 5 | d←{9=⎕NC'⍵':⍵ 6 | w←⊆⍵ 7 | z←⎕NS'' 8 | z.URL←0⊃w 9 | z.Version←1⊃w,⊂'' 10 | 3>≢w:z 11 | z.Alias←2⊃w 12 | 4>≢w:z 13 | z.Inject←3⊃w 14 | z 15 | }⍵ 16 | d.Version←d.URL ResolveVersion d.Version 17 | f←GetProjectFolder ⍺ 18 | c←ReadConfigFile f,'acre.config' 19 | n←'Dependencies' 20 | e←c{6::⍬ ⋄ ⍺⍎⍵}n 21 | 0=≢e:f SetConfigParam n(,d) 22 | f SetConfigParam n(d,⍨(~e.URL∊⊂d.URL)/e) 23 | } 24 | -------------------------------------------------------------------------------- /APLSource/Main-1/AddRemote-9.aplf: -------------------------------------------------------------------------------- 1 | AddRemote←{ 2 | ⍝ ⍺ ←→ ProjectName Replaces AddToGitHub 3 | ⍝ ⍵ ←→ URL 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | u←(¯4×'.git'≡¯4↑⍵)↓⍵ 7 | 0=≢p:'Not in project' 8 | _←p SetConfigParam'URL'u 9 | ⎕←p RunGitCommand'add .' 10 | ⎕←p RunGitCommand'commit -m ','"~Add remote URL to acre config file"' 11 | ⎕←p RunGitCommand'remote add origin ',u,'.git' 12 | ⎕←p RunGitCommand'remote -v' 13 | ⎕←p RunGitCommand'push -u origin master' 14 | 'Done' 15 | } 16 | -------------------------------------------------------------------------------- /APLSource/Main-1/AddTokenToURL-1d09.aplf: -------------------------------------------------------------------------------- 1 | AddTokenToURL←{ 2 | ⍝ ⍺ ←→ Git auth. token 3 | ⍝ ⍵ ←→ URL 4 | 0=≢⍺:⍵ 5 | 'https'≢5↑⍵:⍵ 6 | 'https://',⍺,'@',8↓⍵ 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/BootStrapBuild-211.aplf: -------------------------------------------------------------------------------- 1 | BootStrapBuild←{ 2 | ⍺←0 3 | _←SetAcreConfig 0 4 | pc←##.AcreConfig 5 | pf←pc.ProjectFolder 6 | df←pc.DistFolder 7 | af←df,'Application/Dado/' 8 | _←3 ⎕NDELETE df 9 | _←2 ⎕MKDIR af 10 | tf←af,'Dado' 11 | _←2 ⎕MKDIR tf 12 | _←tf ⎕NCOPY pf,'Assets' 13 | _←tf ⎕NCOPY pf,'acre.config' 14 | _←CopyUserCommandFile ## 15 | _←pc.⎕EX'ProjectFolder' 16 | _←pc.⎕FX ⎕NR'ProjectFolder' 17 | pc.ProjectFolderName←↑GetAppPackFolder,pc 18 | _←0 ⎕SAVE af,pc._Name 19 | _←SetAcreConfig 0 20 | tf←⎕SE.zApps.Dado.ApplicationFolder 21 | _←3 ⎕NDELETE tf 22 | _←tf ⎕NCOPY af 23 | '[dist]/Application/Dado created and copied to ',tf 24 | } 25 | -------------------------------------------------------------------------------- /APLSource/Main-1/Build-1.aplf: -------------------------------------------------------------------------------- 1 | Build←{ 2 | ⍝ ⍺ ←→ Project Folder 3 | ⍝ ⍵ ←→ Version 4 | ⍺←0 5 | pf←GetProjectFolder ⍺ 6 | 0=≢pf:1 'Not in a project' 7 | c←GetConfigSpace pf 8 | _←3 ⎕NDELETE c.DistFolder 9 | rf←GetReleaseArtifactsFolder c 10 | _←2 ⎕MKDIR rf 11 | 746::1 ⎕DMX.EM 12 | c.BuildID←c GetBuildID 0 13 | m←RemoveDevelopmentPackages pf Retrieve ⍵ 14 | m.ProjectFolderName←GetAppPackFolder m 15 | _←c CopyProject¨m 16 | _←c GenerateManifest m 17 | _←c GenerateApplicationNotes m 18 | _←c GenerateReleaseNotes 0 19 | _←c BuildWorkspace ⍵ ⍝ BuildWorkspace_ 20 | _←c ExecuteOnBuild ⍵ ⍝ ExecuteOnBuild_ 21 | zs←c.DistFolder,'Application' 22 | zt←rf,c._Name,'-Application-',⍵,'.zip' 23 | _←Zip zs zt 24 | ⎕←'Build results in:' 25 | ⎕←']open ',c.DistFolder 26 | ↑m.IsProject:0 'OK' 27 | ps←↑m.ProjectFolder 28 | pt←rf,c._Name,'-Package-',⍵,'.zip' 29 | _←Zip ps pt 0 1 30 | 0 'OK' 31 | } 32 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildAPI-e1.aplf: -------------------------------------------------------------------------------- 1 | BuildAPI←{ 2 | n←APIFunctionNames 0 3 | 9=⎕NC'API':API 4 | a←'API'⎕NS'' 5 | f←{,⊂⍵,'←{⍺←⊢ ⋄ ⍺ ##.',⍵,' ⍵}'}¨n 6 | API⊣API.⎕FX¨f 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildListFunction-221.aplf: -------------------------------------------------------------------------------- 1 | BuildListFunction←{ 2 | ⍝ REbuild the list function 3 | ⍝ ⍵ ←→ UCMD Space 4 | l←⍵.List 5 | n←≢l 6 | q←{1↓∊' ',¨{'''',⍵,''''}¨⍵} 7 | t←⊂'z←List' 8 | t,←⊂'z←⎕NS¨',(⍕n),'⍴⊂''''' 9 | t,←⊂'z.Name←',q l.Name 10 | t,←⊂'z.Group←',q l.Group 11 | t,←⊂'z.Desc←',q l.Desc 12 | t,←⊂'z.Parse←',q l.Parse 13 | t 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildNSS-e1.aplf: -------------------------------------------------------------------------------- 1 | BuildNSS←{ 2 | ⍝ ⍺ ←→ Named namespace 3 | ⍺←1 4 | n←↑⌽{⍵⊆⍨'.'≠⍵}⍕⍵ 5 | '['=↑n:'' 6 | t←{16::'' ⋄ ⎕SRC ⍵}⍵ 7 | 0<≢t:t 8 | r←⊂':Namespace ',⍺/n 9 | r,←⊂'⎕IO ⎕ML←',⍕⍵.⎕IO ⍵.⎕ML 10 | q←{(⊂'∇',↑⍵),(1↓⍵),⊂,'∇'} 11 | r,←↑,/q¨⍵.⎕NR¨⍵.⎕NL-3.1 4.1 12 | r,←↑,/⍵.⎕NR¨⍵.⎕NL-3.2 4.2 13 | s←⍵{⍵[⍋⍺.⎕NC ⍵]}⍵.⎕NL-9.1 9.4 9.5 14 | 0=≢s:r,⊂':EndNamespace' 15 | r,←↑,/∇¨⍵⍎¨s 16 | r,⊂':EndNamespace' 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildNamespace-21.aplf: -------------------------------------------------------------------------------- 1 | BuildNamespace←{ 2 | 0=⍺.⎕NC'BuildNamespace':0 3 | ~⍺.BuildNamespace:0 4 | s←⍎⍺.ProjectSpace,'.Main' 5 | n←⍺._Name 6 | h←⊂'⍝ URL: ',⍺.URL 7 | h,←⊂'⍝ Version: ',⍺.Version 8 | h,←⊂'⍝ Build date: ',↑'Mmmm D, YYYY'(1200⌶),¯1 1 ⎕DT⊂⎕TS 9 | t←(⊂':Namespace ',n),h,1↓BuildNSS s 10 | rf←GetReleaseArtifactsFolder ⍺ 11 | fn←rf,n,'.apln' 12 | _←t nput fn 13 | 0 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildScript_-21.aplf: -------------------------------------------------------------------------------- 1 | BuildScript_←{ 2 | ⍝ ⍺ ←→ Project Folder 3 | ⍝ ⍵ ←→ Version 4 | ⍝ ← ←→ Return code, error message 5 | ⍺←0 6 | pf←GetProjectFolder ⍺ 7 | c←GetConfigSpace pf 8 | 0=≢pf:1 'Not in a project' 9 | 746::1 ⎕DMX.EM 10 | m←RemoveDevelopmentPackages pf Retrieve ⍵ 11 | f←m.ProjectFolder 12 | af←GetApplicationFolder c 13 | uc←']acre.OpenProject ' 14 | up←' -track=off -dependencies=off' 15 | load←{⎕SE.UCMD uc,'"',⍵,'" ',⍺,up} 16 | s←⌽⍎¨(⌽m._ProjectSpace)load¨⌽f 17 | _←DeleteDevSpaces¨m 18 | t←BuildNSS¨s 19 | m.ProjectFolderName←GetAppPackFolder m 20 | fn←{af,⍵,'/APLSource.apln'}¨m.ProjectFolderName 21 | _←t nput¨fn 22 | d←0 BuildNSS ⎕THIS 23 | _←d nput af,'Dado.apln' 24 | _←((⊂':Namespace Run'),(⎕NR'Run'),⊂':EndNamespace')nput af,'Run.apln' 25 | 0 'OK' 26 | } 27 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildUCMDFile-3e1.aplf: -------------------------------------------------------------------------------- 1 | BuildUCMDFile←{ 2 | ⍝ ⍵ ←→ UCMD Space 3 | t←'' 4 | t,←⊂'⍝ *******************************************' 5 | t,←⊂'⍝ This is a Dado system generated file.' 6 | t,←⊂'⍝ *******************************************' 7 | t,←⊂'⎕IO ⎕ML←0 3' 8 | t,←{(⊂'∇',0⊃⍵),1↓⍵}(BuildListFunction ⍵),'∇' 9 | t,←⊂'Help←{' 10 | t,←⊂' (GetProject 0).UCMD.Help ⍵' 11 | t,←⊂'}' 12 | t,←⊂'Run←{' 13 | t,←⊂' (GetProject 0).UCMD.Run ⍵' 14 | t,←⊂'}' 15 | t,←⊂'GetProject←{' 16 | t,←⊂' f←SALT_Data.SourceFile' 17 | t,←⊂' n←1⊃⎕NPARTS f' 18 | t,←⊂' 0=⎕SE.⎕NC ''zApps.'',n:LoadProject f' 19 | t,←⊂' a←⎕SE.zApps⍎n' 20 | t,←⊂' a⍎n' 21 | t,←⊂'}' 22 | t,←⊂'LoadProject←{' 23 | t,←⊂' p n←2↑⎕NPARTS ⍵' 24 | t,←⊂' s←⍎(''zApps.'',n)⎕SE.⎕NS ''''' 25 | t,←⊂' _←s.⎕CY p,n,''.dws''' 26 | t,←⊂' s.ApplicationFolder←p' 27 | t,←⊂' a←s.Dado.Main' 28 | t,←⊂' m←s⍎n' 29 | t,←⊂' c←m.AcreConfig' 30 | t,←⊂' _←⍎''⎕SE.'',n,''←a.GetAPISpace m''' 31 | t,←⊂' m' 32 | t,←⊂'}' 33 | (⊂':Namespace'),(' '∘,¨t),⊂':EndNamespace' 34 | } 35 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildWorkspace-21.aplf: -------------------------------------------------------------------------------- 1 | BuildWorkspace←{ 2 | v←⍵ 3 | pf←⍺.ProjectFolder 4 | df←⍺.DyalogVersionFolder 5 | dx←df,(0<≢df)/'dyalog.exe' 6 | q←{'''',⍵,''''} 7 | l←⊂']Dado.Version' 8 | ⍝ Once saving from ⎕SE works, we can simply do: 9 | ⍝ l,←⊂'rc em←',(q pf),' ⎕SE.Dado.BuildWorkspace_ ', qv 10 | l,←⊂'rc em←',(q pf),' (⎕NS ⎕SE.zApps.Dado.Dado).Main.BuildWorkspace_ ',q v 11 | l,←⊂'em' 12 | l,←⊂'⎕OFF (12+rc)' 13 | _←dx ExecuteAPL l 14 | p←(GetApplicationFolder ⍺),⍺._Name,'.dws' 15 | ⎕NEXISTS p:_ 16 | 746 ⎕SIGNAL'BuildWorkspace failed to generate .dws file.' 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/BuildWorkspace_-21.aplf: -------------------------------------------------------------------------------- 1 | BuildWorkspace_←{ 2 | ⍝ ⍺ ←→ Project Folder 3 | ⍝ ⍵ ←→ Version 4 | ⍝ ← ←→ Return code, error message 5 | ⍺←0 6 | pf←GetProjectFolder ⍺ 7 | c←GetConfigSpace pf 8 | 0=≢pf:1 'Not in a project' 9 | 746::1 ⎕DMX.EM 10 | m←RemoveDevelopmentPackages pf Retrieve ⍵ 11 | f←m.ProjectFolder 12 | af←GetApplicationFolder c 13 | uc←']acre.OpenProject ' 14 | up←' -track=off -dependencies=off' 15 | load←{⎕SE.UCMD uc,'"',⍵,'" ',⍺,up} 16 | s←⌽⍎¨(⌽m._ProjectSpace)load¨⌽f 17 | _←DeleteDevSpaces¨m 18 | _←m.⎕EX⊂'ProjectFolder' 19 | _←m.⎕FX⊂⎕NR'ProjectFolder' 20 | m.ProjectFolderName←GetAppPackFolder m 21 | s.AcreConfig←s.⎕NS m 22 | _←s∘SetReferences¨s 23 | #.⎕LX←SetQuadLX↑s 24 | _←(↑s)Execute'OnSave' 25 | _←0 ⎕SAVE af,c._Name,'.dws' 26 | _←c BuildNamespace'' 27 | 0 'OK' 28 | } 29 | -------------------------------------------------------------------------------- /APLSource/Main-1/CheckAPLVersion-1e1.aplf: -------------------------------------------------------------------------------- 1 | CheckAPLVersion←{ 2 | ⍝ ⍵←ConfigFile 3 | c←⍵ 4 | n←'DyalogVersion' 5 | 0=c.⎕NC n:0 6 | tv←c⍎n 7 | sv←1⊃'.'⎕VFI tv 8 | av←APLVersion.Build 9 | lt←{((⍳2)≡⍋⍺ ⍵)∧⍺≢⍵} 10 | e←av lt sv 11 | ~e:0 12 | pd←c.URL 13 | ij←c.IsProject 14 | pt←ij⊃'package' 'project' 15 | ⎕←'Warning: ',pt,' ',pd,' specifies a later Dyalog APL interpreter (',tv,')' 16 | e 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/Checkout-1.aplf: -------------------------------------------------------------------------------- 1 | Checkout←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Branch 4 | ⍝ ← ←→ New current branch 5 | ⍺←0 6 | p←GetProjectFolder ⍺ 7 | p≡'':'Not in project' 8 | p IsDirty'':'Uncommited changes.' 9 | ⎕←p RunGitCommand'checkout ',⍵ 10 | p RefreshProject 0 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/CheckoutMaster-101.aplf: -------------------------------------------------------------------------------- 1 | CheckoutMaster←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ n/a 4 | ⍝ ← ←→ New current branch 5 | ⍺←0 6 | p←GetProjectFolder ⍺ 7 | p IsDirty'':'Uncommited changes.' 8 | ⎕←p RunGitCommand'checkout master' 9 | p RefreshProject 0 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/Commit-1.aplf: -------------------------------------------------------------------------------- 1 | Commit←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Message 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | p≡'':'Not in project' 7 | nm←'master'≢p GetCurrentBranch'' 8 | m←⍵,(nm∧0=≢⍵)/'Save point' 9 | _←p RunGitCommand'add --all' 10 | ⊃p RunGitCommand'commit -m "',m,'"' 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/ComputeCaseCode-881.aplf: -------------------------------------------------------------------------------- 1 | ComputeCaseCode←{ 2 | b←{(~∧\⍵=0)/⍵}⌽⍵≠⎕C ⍵ 3 | n←1⌈⌈(≢b)÷4 4 | r←(n,4)⍴(-n×4)↑b 5 | '0123456789abcdef'[2⊥⍉r] 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/CopyPackage-11.aplf: -------------------------------------------------------------------------------- 1 | CopyPackage←{ 2 | f← ⍝ Package Folder 3 | t← ⍝ Target folder 4 | n←↑(⎕NINFO⍠1)f,'*' 5 | _←t∘⎕NCOPY¨n~⊂f,'APLSource' 6 | 0 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/CopyProject-11.aplf: -------------------------------------------------------------------------------- 1 | CopyProject←{ 2 | ⍝ Copy a Project or Package 3 | ⍝ NB. Most of the deletions will be redundant for a Package 4 | ⍝ ...which is already stripped. 5 | ⍝ ⍺ ←→ Primary Project Config 6 | ⍝ ⍵ ←→ Dependent Package or Project Config Space 7 | f←⍵.ProjectFolder 8 | af←GetApplicationFolder ⍺ 9 | t←af,⍵.ProjectFolderName 10 | _←2 ⎕MKDIR t 11 | p←↑(⎕NINFO⍠1)f,'*' 12 | q←f∘,¨'dist' 'APLSource' '.git' '.gitignore' '.gitattributes' '.github' 13 | _←t∘⎕NCOPY¨p~q 14 | _←0 DeleteDevFolders GetConfigSpace t 15 | 0 16 | } 17 | -------------------------------------------------------------------------------- /APLSource/Main-1/CopyUserCommandFile-8111.aplf: -------------------------------------------------------------------------------- 1 | CopyUserCommandFile←{ 2 | ⍝ ⍵ ←→ Project Space 3 | 9≠⍵.⎕NC'UCMD':0 4 | c←⍵.AcreConfig 5 | af←GetApplicationFolder c 6 | tn←af,c._Name,'.dyalog' 7 | _←(⊂BuildUCMDFile ⍵.UCMD)⎕NPUT tn 8 | 0 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/CreateNewVersion-241.aplf: -------------------------------------------------------------------------------- 1 | CreateNewVersion←{ 2 | ⍝ ⍺ ←→ Project Name 3 | ⍝ ⍵ ←→ 'major'|'minor'| 'patch' | '' (for patch) | 'i.j.k' 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | v←p GetNextVersion ⍵ 7 | b←p NewReleaseBranch v 8 | _←p GeneratePackageNotes v 9 | _←p Commit'Release ',v 10 | ⎕←⊃p RunGitCommand'checkout master' 11 | ⎕←⊃p RunGitCommand'merge --ff-only ',b 12 | ⎕←⊃p DeleteBranch b 13 | ⎕←⊃p RunGitCommand'tag -a ',v,' -m "Version ',v,'"' 14 | v 15 | } 16 | -------------------------------------------------------------------------------- /APLSource/Main-1/CreateProject-41.aplf: -------------------------------------------------------------------------------- 1 | CreateProject←{ 2 | ⍝ ⍵ ←→ Folder Name, Space 3 | a←ExpandProjectPath ⍵ 4 | p←⍎⎕SE.UCMD'Acre.CreateProject ',a 5 | _←p EnhanceAcreConfig'' 6 | p.AcreConfig←GetConfigSpace p 7 | _←p WriteGitIgnore'' 8 | _←p WriteGitAttributes'' 9 | ⎕←p RunGitCommand'init' 10 | ⎕←p RunGitCommand'add .' 11 | ⎕←p RunGitCommand'commit -m ','"~First commit"' 12 | _←SetupWorkspace p 13 | p 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/DecodeCaps-41.aplf: -------------------------------------------------------------------------------- 1 | DecodeCaps←{ 2 | ⍝ ⍵ ←→ Matrix of case coded names 3 | ⍝ ← ←→ Decoded names 4 | ~'-'∊⍵:⍵ 5 | p←⍵(⊆⍤1)⍨⍵≠'-' 6 | n←⊃p[;0] 7 | c←⌽{⍵⌽⍨+/∧\' '=⍵}⌽⊃p[;1]~¨' ' 8 | h←⎕D,'abcdef' 9 | b←(⍴n)↑⌽,[1 2]⍉(4⍴2)⊤h⍳⍉¯1 ⎕C c ⍝ investigate (,⍤2) ←→ ,[1 2] 10 | ⊣⌿b⊖⊃¯1 1 ⎕C¨⊂n 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/DecodeOctalEncoding-841.aplf: -------------------------------------------------------------------------------- 1 | DecodeOctalEncoding←{ 2 | ~'"'∊⍵:⍵ 3 | d←'UTF-8'⎕UCS ⎕UCS'\\\d{3}'⎕R{⎕UCS 8⊥⎕D⍳1↓⍵.Match}⍵ 4 | d~'"' 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/DefaultParameter-81.aplf: -------------------------------------------------------------------------------- 1 | DefaultParameter←{ 2 | ⍝ ⍺ ←→ Config Space 3 | ⍝ ⍵ ←→ Parameter Name, Default Value 4 | ⍝ ← ←→ Parameter Value 5 | n d←⍵ 6 | 6::d 7 | v←⍺⍎n 8 | v≡'':d 9 | v 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/DeleteBranch-41.aplf: -------------------------------------------------------------------------------- 1 | DeleteBranch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Branch Name 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | p RunGitCommand'branch -d ',⍵ 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/DeleteDevFolders-241.aplf: -------------------------------------------------------------------------------- 1 | DeleteDevFolders←{ 2 | ⍝ ⍺ ←→ IsApplication flag 3 | ⍝ ⍵ ←→ Config Space 4 | ⍺:0 5 | f←{6::'' ⋄ ⍵.DevelopmentFolders}⍵ 6 | 0=≢f:0 7 | p←⍵.ProjectFolder 8 | d←{∊1 ⎕NPARTS p,⍵}¨f 9 | _←3 ⎕NDELETE¨d 10 | 0 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/DeleteDevSpaceFolders-4241.aplf: -------------------------------------------------------------------------------- 1 | DeleteDevSpaceFolders←{ 2 | ⍵.IsApplication:0 3 | s←{6::'' ⋄ ⍵.DevelopementSpaces}⍵ 4 | 0=≢s:0 5 | d←⍵ SpaceToFolder¨s 6 | _←3 ⎕NDELETE¨d 7 | 0 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/DeleteDevSpaces-241.aplf: -------------------------------------------------------------------------------- 1 | DeleteDevSpaces←{ 2 | ⍝ ⍵ ←→ Config Space 3 | n←{6::'' ⋄ ⍵.DevelopmentSpaces}⍵ 4 | 0=≢n:0 5 | s←⍎⍵._ProjectSpace 6 | _←s.⎕EX n 7 | 0 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/DeleteGitItems-241.aplf: -------------------------------------------------------------------------------- 1 | DeleteGitItems←{ 2 | ⍝ ⍵ ←→ Package Folder 3 | p←⍵ 4 | q←'"',p,'.git/*.*"' 5 | _←⎕CMD'attrib -s -h -r ',q,' /s /d' 6 | _←3 ⎕NDELETE¨(p,'.git')∘,¨'' 'attributes' 'ignore' 7 | 0 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/DependencyError-401.aplf: -------------------------------------------------------------------------------- 1 | DependencyError←{ 2 | ⍝ ⍺ ←→ Dependency Space 3 | ⍝ ⍵ ←→ Error message 4 | u←⍺{6::'' ⋄ ⍺⍎⍵}'URL' 5 | m←⍵,' → ',u 6 | ⍺.SignalError:m ⎕SIGNAL 746 7 | ⎕←m 8 | 0 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/DependencyReport-401.aplf: -------------------------------------------------------------------------------- 1 | DependencyReport←{ 2 | ⍺←0 3 | p←GetProjectFolder ⍺ 4 | c←GetConfigSpace p 5 | r←p DependencyState 0 6 | ns←~r.IsSafeToTestForRelease 7 | t←' Current workspace state is ',(ns/'**NOT** '),'safe for testing for release.' 8 | o←'Dependency' 'SpecifiedVersion' 'LoadedVersion' 'CurrentBranch' 'NewVersion' 'UnreleasedCommits' 9 | r.Title←' ',c._Name,' Dependency Report' 10 | r.Subtitle←' * Locally cloned project (vs package)' ' ! Uncommitted changes't 11 | o FormatTable r 12 | } 13 | -------------------------------------------------------------------------------- /APLSource/Main-1/DependencyState-401.aplf: -------------------------------------------------------------------------------- 1 | DependencyState←{ 2 | ⍺←0 3 | p←GetProjectFolder ⍺ 4 | 0=≢p:1 'Not in a project' 5 | c←GetConfigSpace p 6 | c.SignalError←0 7 | c.LocalProjects←RetrieveLocalProjects p 8 | c.ProjectOverride←1 9 | nd←1↓RetrieveDependencies c 10 | c.ProjectOverride←0 11 | vd←1↓RetrieveDependencies c 12 | ap←∧/(⍎¨vd._ProjectSpace).AcreConfig.IsPackage ⍝ Actually loaded 13 | nd←ap⊃nd vd 14 | t←{⍵.IsProject:⍵.ProjectFolder GetTags 0 ⋄ GetRemoteTags ⍵}¨nd 15 | r←⎕NS'' 16 | r.Dependency←(' ' '*'[nd.IsProject]),¨vd._Name 17 | r.SpecifiedVersion←vd.Version 18 | r.LoadedVersion←vd.Version{⍺≡⍵:'←' ⋄ ⍵}¨nd.Version 19 | r.MostRecentVersion←FormatVersion¨t.MostRecentVersion 20 | r.NewVersion←{0=≢⍵:⍵ ⋄ 'Yes (',⍵,')'}¨(r.SpecifiedVersion≡¨r.MostRecentVersion)⊃¨{⍵''}¨r.MostRecentVersion 21 | r.UnreleasedCommits←nd{⍺.IsPackage:'?' ⋄ ⍵}¨{⍵=0:'' ⋄ 'Yes (',(⍕⍵),')'}¨≢¨nd.ProjectFolder{⍺ RunGitCommand'log ',⍵,'..HEAD --pretty=format:"%h %an, %ar, %s'}¨r.MostRecentVersion 22 | r.IsDirty←{⍵.IsPackage:0 ⋄ ⍵.ProjectFolder IsDirty 0}¨nd 23 | r.CurrentBranch←' !'[r.IsDirty],¨{⍵.IsPackage:'n/a' ⋄ ⍵.ProjectFolder GetCurrentBranch 0}¨nd 24 | r.IsSafeToTestForRelease←∧/nd.IsPackage∨(r.CurrentBranch∊⊂' master')∧~r.UnreleasedCommits∊⊂'' 25 | r 26 | } 27 | -------------------------------------------------------------------------------- /APLSource/Main-1/DownloadProject-101.aplf: -------------------------------------------------------------------------------- 1 | DownloadProject←{ 2 | ⍝ ⍺ ←→ Git token or empty 3 | ⍝ ⍵ ←→ url, directory 4 | ⍺←'' 5 | u d←⍵ 6 | ⎕NEXISTS d:d PullMaster'' 7 | au←⍺ AddTokenToURL u 8 | c←'clone ',au,' "',d,'"' 9 | r←RunProcess'git'c 10 | r.StdErr 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/EnhanceAcreConfig-881.aplf: -------------------------------------------------------------------------------- 1 | EnhanceAcreConfig←{ 2 | ⍺←0 3 | _←⍺ SetConfigParam'URL' '' 4 | _←⍺ SetConfigParam'Dependencies'⍬ 5 | _←⍺ SetConfigParam'DevelopmentFolders'⍬ 6 | _←⍺ SetConfigParam'DevelopmentSpaces'⍬ 7 | _←⍺ SetConfigParam'API' '' 8 | _←⍺ SetConfigParam'OnApplicationStartup' '' 9 | _←⍺ SetConfigParam'OnSave' '' 10 | _←⍺ SetConfigParam'OnBuild' '' 11 | _←⍺ SetConfigParam'Version' '0.0.0' 12 | 0 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/Execute-1.aplf: -------------------------------------------------------------------------------- 1 | Execute←{ 2 | ⍝ ⍺ ←→ ProjectSpace 3 | ⍝ ⍵ ←→ Config Parameter Name 4 | c←⍺.AcreConfig 5 | 0=c.⎕NC ⍵:0 6 | f←c⍎⍵ 7 | 0=≢f:0 8 | 3≠⍺.⎕NC f:0 9 | (⍺⍎f)⍺ 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/ExecuteAPL-381.aplf: -------------------------------------------------------------------------------- 1 | ExecuteAPL←{ 2 | ⍝ ⍺ ←→ [Executable] [Arguments] 3 | ⍝ Executable defaults to current session executable 4 | ⍝ (use '' to default if providing args) 5 | ⍝ Arguments e.g.: '-b maxws=1g default_io=1' 6 | ⍝ ⍵ ←→ One or more expressions to execute 7 | ⍝ ← ←→ Exit Code, Session Output 8 | ⍺←'' 9 | (x a)←2↑(⊆⍺),⊂'ShowStatusOnError=0 Dyalog_LineEditor_Mode=1' 10 | cx aa←GetStartupEnvironmentVariables'' 11 | in←∊(⊆⍵),¨⎕UCS 13 12 | _net←⎕NS'' 13 | _net.⎕USING←{ 14 | ⍵:'System' 'System.IO,System.Runtime.Extensions' 'System.Diagnostics,System.Diagnostics.Process' 15 | 'System' 'System.IO' 'System.Diagnostics,System.dll' 16 | }IsNetCore'' 17 | r←⎕NS'' 18 | p←⎕NEW _net.Process 19 | i←p.StartInfo 20 | i.FileName←x cx⊃⍨0=≢x 21 | i.Arguments←aa,' ',a 22 | i.RedirectStandardOutput←1 23 | i.RedirectStandardInput←1 24 | i.RedirectStandardError←1 25 | i.UseShellExecute←0 26 | _←p.Start ⍬ 27 | sw←⎕NEW _net.StreamWriter p.StandardInput.BaseStream 28 | op←{6::0 ⋄ ⍺⍺ ⍵} 29 | _←sw.Write op⊂in 30 | _←{6::0 ⋄ z←sw.Close}0 31 | r←⎕NS'' 32 | sr←⎕NEW _net.StreamReader p.StandardError.BaseStream 33 | r.SessionOutput←{(~' '∧.=¨⍵)/⍵}{⍵⊆⍨~⍵∊⎕UCS 13 10}sr.ReadToEnd 34 | _←p.WaitForExit op ⍬ 35 | r.ExitCode←p.ExitCode 36 | r 37 | } 38 | -------------------------------------------------------------------------------- /APLSource/Main-1/ExecuteOnBuild-281.aplf: -------------------------------------------------------------------------------- 1 | ExecuteOnBuild←{ 2 | v←⍵ 3 | pf←⍺.ProjectFolder 4 | df←⍺.DyalogVersionFolder 5 | dx←df,(0<≢df)/'dyalog.exe' 6 | q←{'''',⍵,''''} 7 | l←⊂']Dado.Version' 8 | l,←⊂'rc em←',(q pf),' ⎕SE.Dado.##.ExecuteOnBuild_ ',q v 9 | l,←⊂'em' 10 | l,←⊂'⎕OFF (12+rc)' 11 | dx ExecuteAPL l 12 | } 13 | -------------------------------------------------------------------------------- /APLSource/Main-1/ExecuteOnBuild_-281.aplf: -------------------------------------------------------------------------------- 1 | ExecuteOnBuild_←{ 2 | ⍺←0 3 | pf←GetProjectFolder ⍺ 4 | 0=≢pf:1 'Not in a project' 5 | c←GetConfigSpace pf 6 | 746::1 ⎕DMX.EM 7 | m←pf Retrieve ⍵ 8 | f←m.ProjectFolder 9 | load←{⎕SE.UCMD']acre.OpenProject "',⍵,'" ',⍺,' -track=off -dependencies=off'} 10 | s←⌽⍎¨(⌽m._ProjectSpace)load¨⌽f 11 | s.AcreConfig←s.⎕NS m 12 | _←s∘SetReferences¨s 13 | p←↑s 14 | p.AcreConfig.DistFolder←c.DistFolder 15 | _←CopyUserCommandFile p 16 | _←p Execute'OnBuild' 17 | 0 'OK' 18 | } 19 | -------------------------------------------------------------------------------- /APLSource/Main-1/ExistingAncestor-101.aplf: -------------------------------------------------------------------------------- 1 | ExistingAncestor←{ 2 | ⍝ ⍵ ←→ FQN of an item 3 | ⍝ ← ←→ Nearest existing parent space 4 | p←(⍸'.'=⍵)↑¨⊂⍵ 5 | i←¯1++/0≠⎕NC p 6 | ⍎i⊃p 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/ExpandProjectPath-2041.aplf: -------------------------------------------------------------------------------- 1 | ExpandProjectPath←{ 2 | ⍝ ⍵ ←→ Character array leading with Project Folder 3 | f←dlb∘⌽⍣2⊢⍵ 4 | d←2 ⎕NQ'.' 'GetEnvironment' 'DadoProjectsFolder' 5 | q←(0<≢d)∧~∨/f∊'/\' 6 | p←f,⍨q/d,'/' 7 | ⎕USING←,⊂'System' 8 | Environment.ExpandEnvironmentVariables⊂p 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/Fetch-1.aplf: -------------------------------------------------------------------------------- 1 | Fetch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ '' 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | ⎕←p RunGitCommand'fetch origin' 7 | ⊃p RunGitCommand'diff --name-status master origin/master' 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/FileNameToItemName-4511.aplf: -------------------------------------------------------------------------------- 1 | FileNameToItemName←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ File Name 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | f←DecodeOctalEncoding ⍵ 7 | 'APLSource/'≢10↑f:f 8 | ↑⎕SE.acre.Itemname p,f 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/FileNamesToItemNames-8a11.aplf: -------------------------------------------------------------------------------- 1 | FileNamesToItemNames←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ File Names v/v 4 | ⍺←0 5 | f←9↓[1]⊃⍵ 6 | s←⍕GetProjectSpace ⍺ 7 | c←⊃∪{⍵⊆⍨~⍵∊'/.'}' '~⍨∊f 8 | d←DecodeCaps c 9 | c d←(~∘' '¨↓)¨c d 10 | p←f(⊆⍤1)⍨~f∊'/.' 11 | m←(d,⊂'')[c⍳p] 12 | i←∊¨'.',¨¨(↓m)~¨⊂⊂'' 13 | (s''[0=≢¨i]),¨i 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/FixPath-9.aplf: -------------------------------------------------------------------------------- 1 | FixPath←{ 2 | ⍝ ⍵ ←→ Directory path 3 | ⍝ ← ←→ Normalized filepath 4 | ⍝ Add trailing slash if required. 5 | ⍝ ⎕NINFO fails on nonstandard and nonexistent paths. 6 | 0≠80|⎕DR ⍵:⍵ 7 | p←('/'@('\'=⊢))⍵ 8 | p,←('/'≠¯1↑p)/'/' 9 | p 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/FormatConfigSpace-1041.aplf: -------------------------------------------------------------------------------- 1 | FormatConfigSpace←{ 2 | ⍝ Format config space as JSON, NSScript, or APLAN 3 | ⍝ ⍵ ←→ Config Space 4 | ⍝ ← ←→ v/v suitable for ⎕NPUT 5 | t←⍵._FileType 6 | s←⎕NS ⍵ 7 | _←s.⎕EX'_FileType' 8 | t≡'JSON':{⍵⊆⍨⍵≠⎕UCS 13}(⎕JSON⍠'Compact' 0)s 9 | t≡'NSScript':NStoScript s 10 | r←NStoScript s 11 | r[0]←⊂'[' 12 | (¯1↓r),⊂']' 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/FormatStatus-41.aplf: -------------------------------------------------------------------------------- 1 | FormatStatus←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Result of Status or Diff 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | 0=≢⍵:' {none}' 7 | m←DecodeOctalEncoding¨⍵ 8 | m←⊃{b←' '≠⍵ ⋄ b[0]←1 ⋄ b⊆⍵}¨m 9 | f←m[;1] 10 | b←'APLSource/'∘≡¨10↑¨f 11 | b←b∧~'R'=↑¨m[;0] 12 | ~∨/b:m 13 | n←⎕SE.acre.Itemname p∘,¨b/f 14 | m[⍸b;1]←n 15 | m 16 | } 17 | -------------------------------------------------------------------------------- /APLSource/Main-1/FormatTable-41.aplf: -------------------------------------------------------------------------------- 1 | FormatTable←{ 2 | ⍺←⍵.⎕NL ¯2 3 | v←⍕¨¨⍵⍎¨⍺ 4 | p←{⎕ML←1 ⋄ ⍵⊂⍨⍵∊⎕A}¨⍺ 5 | hr←⌈/≢¨p 6 | h←(-hr)↑¨p 7 | m←⊃¨h,¨'-',¨v 8 | m←⍕m 9 | m[hr;]←'-' ⍝ '─' 10 | ⍝ m←1 2{⍵↑⍨-⍺+⍴⍵}m ⍝ Top Left 11 | ⍝ m←1 2{⍵↑⍨⍺+⍴⍵}m ⍝ Bot Right 12 | m←↑{⌽⊖⍵↑⍨⍺+⍴⍵}/(0 2)(0 2)m 13 | box ⍵.Title m ⍵.Subtitle 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/FormatVersion-41.aplf: -------------------------------------------------------------------------------- 1 | FormatVersion←{ 2 | ⍝ Self Inverse 3 | ⍝ ⍵ ←→ 'x.y.z' 4 | ⍝ ← ←→ x y z 5 | ⍝ ⍵ ←→ x y z 6 | ⍝ ← ←→ 'x.y.z' 7 | 0≠80|⎕DR ⍵:'.'@(' '∘=)⍕⍵ 8 | 1⊃'.'⎕VFI∊(⊂'¯1')@('^'∘=)⍵ 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/GUID-f.aplf: -------------------------------------------------------------------------------- 1 | Z←GUID 2 | :If APLVersion.OS≡'Windows' 3 | Z←{s←'S'⎕WC'OLEServer' ⋄ 128↑S.ClassID}0 4 | :Else 5 | Z←{⎕ML←3 ⋄ ↑⎕SH'uuidgen'}'' 6 | Z←'{',Z,'}' 7 | :EndIf 8 | Z←Z~' ' 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/GenerateApplicationNotes-80101.aplf: -------------------------------------------------------------------------------- 1 | GenerateApplicationNotes←{ 2 | ⍝ ⍺ ←→ Primary Project Config 3 | ⍝ ⍵ ←→ Manifest (All configs) 4 | ⍝ ← ←→ Combined release notes 5 | c←⍺ 6 | p←⍺.ProjectFolder 7 | pn←nget p,'ReleaseNotes.md' 8 | af←GetApplicationFolder c 9 | fn←af,'ReleaseNotes.md' 10 | in←⍵ GetIncludeInApplicationNotes c 11 | 0=≢in:pn nput fn 12 | dn←nget¨in,¨⊂'ReleaseNotes.md' 13 | an←(⊂pn),dn 14 | b←~(≢an)↑1 15 | q←b ProcessPackageNotes¨an 16 | d n←↑¨,/¨↓⍉⊃q 17 | n←n[⍒d] 18 | n←↑,/n,¨⊂⊂'' 19 | n nput fn 20 | } 21 | -------------------------------------------------------------------------------- /APLSource/Main-1/GenerateManifest-101.aplf: -------------------------------------------------------------------------------- 1 | GenerateManifest←{ 2 | ⍝ ⍺ ←→ Primary Project Config 3 | ⍝ ⍵ ←→ Manifest (All configs) 4 | af←GetApplicationFolder ⍺ 5 | m←⎕NS'' 6 | m.BuildID←⍺.BuildID 7 | m.Packages←ManifestEntry¨⍵ 8 | m nputJSON af,'Manifest.json' 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/GeneratePackageNotes-8101.aplf: -------------------------------------------------------------------------------- 1 | GeneratePackageNotes←{ 2 | ⍝ ⍺ ←→ Project Name 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | c←GetConfigSpace p 6 | pn←p GetCommits'' 7 | m←(⊂'Release ',⍵),pn.Message 8 | k←~('~'=↑¨m)∨'Merge'∘≡¨5↑¨m 9 | b←'Release '∘≡¨8↑¨k/m 10 | pm←1↓¨(+\b)⊆k/m 11 | t←'# '∘,¨c._Name∘,¨' ',¨(b/k/m),¨' ',¨19↑¨b/k/(⊂''),pn.Date 12 | i←(⍕¨¨1+⍳¨≢¨pm),¨¨⊂⊂'. ' 13 | rn←(⊂¨t),¨i,¨¨pm 14 | rn←¯1↓↑,/rn,¨⊂⊂'' 15 | _←rn nput p,'ReleaseNotes.md' 16 | 0 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/GenerateReleaseNotes-8101.aplf: -------------------------------------------------------------------------------- 1 | GenerateReleaseNotes←{ 2 | ⍝ Generates marginal release notes 3 | ⍝ from cumulative application notes 4 | c←⍺ 5 | p←⍺.ProjectFolder 6 | f←GetApplicationFolder ⍺ 7 | n←1↓nget f,'ReleaseNotes.md' 8 | m←(~∨\'# '∘≡¨2↑¨n)/n 9 | q←('' '#'['#'=↑¨m]),¨m 10 | t←⊂'## Release Notes' 11 | (t,q)nput f,'MarginalReleaseNotes.md' 12 | } 13 | -------------------------------------------------------------------------------- /APLSource/Main-1/Get-1.aplf: -------------------------------------------------------------------------------- 1 | Get←{ 2 | ⍝ ⍺ ←→ Config Space 3 | ⍝ ⍵ ←→ Parameter Name 4 | ⍝ ← ←→ Parameter Value 5 | 6::'' 6 | ⍺⍎⍵ 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetAPISpace-79.aplf: -------------------------------------------------------------------------------- 1 | GetAPISpace←{ 2 | p←⍵ 3 | c←p.AcreConfig 4 | 0=c.⎕NC'API':p 5 | ''≡c.API:p 6 | 9=p.⎕NC c.API:p⍎c.API 7 | 3≠p.⎕NC c.API:p 8 | (p⍎c.API)0 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetAppPackFolder-449.aplf: -------------------------------------------------------------------------------- 1 | GetAppPackFolder←{ 2 | ⍝ ⍵ ←→ Package Config Spaces 3 | ⍝ ← ←→ Minimum names for uniqueness 4 | fdn←{1≠+⌿⍵∘.≡⍵} 5 | n←⍵._Name 6 | gn←⍵._Group,¨' ',¨n 7 | vn←gn,¨' ',¨⍵.Version 8 | b←↑+/fdn¨n gn 9 | b⊃¨↓⍉⊃n gn vn 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetApplicationFolder-4009.aplf: -------------------------------------------------------------------------------- 1 | GetApplicationFolder←{ 2 | ⍝ ⍵ ←→ ProjectSpace 3 | ⍵.DistFolder,'Application/',⍵._Name,'/' 4 | } 5 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetBuildID-309.aplf: -------------------------------------------------------------------------------- 1 | GetBuildID←{ 2 | s←⍺ 3 | 0=≢{6::'' ⋄ ⍵.OnBuild}s:0 4 | p←s.ProjectFolder 5 | q←{6::0 ⋄ ⍵.Public}s 6 | n←'BuildIDs',⍨q⊃'Private' 'Public' 7 | u←n,⍨↑⎕NPARTS s.URL 8 | d←s.ProjectsFolder,'.',n 9 | t←GetGithubToken s.ProjectsFolder 10 | r←t DownloadProject u d 11 | ∨/r∊⊂'remote: Repository not found.':0 12 | f←d,'/BuildIDs.json' 13 | b←{0::'' ⋄ ⎕JSON↑⎕NGET ⍵}f 14 | in id←{0::⊂'' ⋄ ⍵.ProjectName ⍵.BuildID}b 15 | pn←s._Name 16 | ne←~in∊⍨⊂pn 17 | in,←ne/⊂pn 18 | id,←ne/0 19 | i←in⍳⊂pn 20 | id[i]+←1 21 | b←⎕NS¨(≢in)⍴⊂'' 22 | b.ProjectName b.BuildID←in id 23 | _←b nputJSON f 24 | _←d Commit ⎕←'Increment build ID for ',pn,' v ',s.Version,' to ',⍕id[i] 25 | _←d Push'' 26 | id[i] 27 | } 28 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetCommitDate-209.aplf: -------------------------------------------------------------------------------- 1 | GetCommitDate←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | ↑p RunGitCommand'show -s --format=%ci HEAD' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetCommits-9.aplf: -------------------------------------------------------------------------------- 1 | GetCommits←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Specific Branch (defaults to current branch) 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | r←p RunGitCommand'log ',⍵,' --pretty=format:"%h|%ci|%an|%s"' 7 | m←(⎕CSV⍠('Separator' '|')('QuoteChar' ''))⊂r 8 | s←⎕NS'' 9 | s.(Hash Date User Message)←↓⍉m 10 | s 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetConfigSpace-209.aplf: -------------------------------------------------------------------------------- 1 | GetConfigSpace←{ 2 | ⍝ ⍺ ←→ Dependency Space 3 | ⍝ ⍵ ←→ ProjectFolder 4 | ⍺←⎕NS'' 5 | f←GetProjectFolder ⍵ 6 | c←ReadConfigFile f,'acre.config' 7 | c.ProjectFolder←f 8 | c.IsProject←⎕NEXISTS f,'.git' 9 | c.IsPackage←~c.IsProject 10 | c.IsApplication←{6::0 ⋄ 0<≢⍵.OnBuild}c 11 | c.(_Group _Name)←GroupAndName c 12 | c._ProjectSpace←⍺ ProjectSpace c 13 | c.DistFolder←(GetTempDir 0),'/Dado/',c._Name,'/' 14 | c.ProjectsFolder←({↑⎕NPARTS ¯1↓⍵}⍣(1+c.IsPackage))f 15 | c.DyalogVersionFolder←GetDyalogVersionFolder c 16 | 0=⍺.⎕NC'LocalProjects':c 17 | c.LocalProjects←⍺.LocalProjects 18 | c.SignalError←⍺.SignalError 19 | c.ProjectOverride←⍺.ProjectOverride 20 | c 21 | } 22 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetCurrentBranch-409.aplf: -------------------------------------------------------------------------------- 1 | GetCurrentBranch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | 0⊃p RunGitCommand'rev-parse --abbrev-ref HEAD' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetDyalogVersionFolder-10209.aplf: -------------------------------------------------------------------------------- 1 | GetDyalogVersionFolder←{ 2 | d←⍵ DefaultParameter'Dyalog' '' 3 | 0=≢d:'' 4 | ⍵.ProjectsFolder,'.DyalogSystem/Versions/',d,'/' 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetFileName-89.aplf: -------------------------------------------------------------------------------- 1 | GetFileName←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ '' 4 | ⍝ ⍵← '#.Space.Foo' 5 | ⍝ ⍵← '/folder/file.txt' 6 | ⍺←0 7 | p←GetProjectFolder ⍺ 8 | 0=≢⍵:⍵ 9 | '/'∊⍵:('/'=↑⍵)↓⍵ 10 | (≢p)↓↑⎕SE.acre.Sourcefile ⍵ 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetFullyQualifiedItemName-220109.aplf: -------------------------------------------------------------------------------- 1 | GetFullyQualifiedItemName←{ 2 | ''≡⍵:⍵ 3 | '#'=↑⍵:⍵ 4 | '/'∊⍵:⍵ 5 | (↑⌽⎕NSI),'.',⍵ 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetGithubToken-209.aplf: -------------------------------------------------------------------------------- 1 | GetGithubToken←{ 2 | ⍝ ⍵ ←→ Projects Folder 3 | ⍝ ← ←→ GitHub Personal Access Token 4 | p←⍵,'GitHubToken.txt' 5 | ~⎕NEXISTS p:'' 6 | t←0⊃⎕NGET p 7 | t~⎕UCS 13 10 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetHistory-9.aplf: -------------------------------------------------------------------------------- 1 | GetHistory←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵←'' for entire commit history 4 | ⍝ ←'filename' for specific file 5 | ⍝ ←'itemname' #.Space.Foo, etc 6 | ⍺←0 7 | cp←GetProjectFolder ⍺ ⍝ context or calling project folder 8 | q←'#'=↑⍵ ⍝ Fully qualified name. 9 | ⍝ Use cs 10 | n←GetFullyQualifiedItemName ⍵ 11 | p←{ 12 | q:(GetProjectSpace ExistingAncestor n).AcreConfig.ProjectFolder 13 | cp 14 | }0 15 | f←p GetFileName n 16 | g←'log --name-status --pretty="*%h,%an,%ai"' 17 | r←p RunGitCommand g,(f≢'')/' --follow -- ',f 18 | s←p ProcessLog r 19 | f≡'':s 20 | h fn←s.CommitHash s.FileName 21 | s.Diff←h{7↓p RunGitCommand'show ',⍺,' ',⍵}¨fn 22 | s.Value←h{p RunGitCommand'show ',⍺,':',⍵}¨fn 23 | s 24 | } 25 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetIncludeInApplicationNotes-801409.aplf: -------------------------------------------------------------------------------- 1 | GetIncludeInApplicationNotes←{ 2 | ⍝ ⍺ ←→ Manifest 3 | ⍝ ⍵ ←→ 4 | ⍝ ←→ List of Names 5 | c←⍵ 6 | n←'Dependencies' 7 | 0=c.⎕NC n:'' 8 | d←RemoveDevelopmentPackages c⍎n 9 | 0=≢d:'' 10 | n←'IncludeInReleaseNotes' 11 | i←d{6::0 ⋄ ⍺⍎⍵}¨⊂n 12 | p←⍺[⍺.URL⍳d.URL] 13 | i/p.ProjectFolder 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetInjectionInfo-1009.aplf: -------------------------------------------------------------------------------- 1 | GetInjectionInfo←{ 2 | ⍝ ⍺ ←→ All Projects 3 | ⍝ ⍵ ←→ Project 4 | ⍝ ←→ Dependencies, Aliases, Inject 5 | z←⍬ ⍬ ⍬ 6 | q c←(⍺ ⍵).AcreConfig 7 | 0=c.⎕NC'Dependencies':z 8 | 0=≢c.Dependencies:z 9 | m←c.Dependencies 10 | k←q.(URL Version)⍳m.(URL Version) 11 | j←q.URL⍳m.URL 12 | i←(k=≢q)⊃¨↓⍉⊃k j 13 | b←i<≢q 14 | ~∨/b:z 15 | d←⍺[b/i] 16 | n←d.AcreConfig._Name 17 | a←n{6::⍺ ⋄ 0=≢⍵.Alias:⍺ ⋄ ⍵.Alias}¨b/m 18 | t←{6::0 ⋄ ⍵.Inject}¨b/m 19 | d a t 20 | } 21 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetLastReleaseDate-4089.aplf: -------------------------------------------------------------------------------- 1 | GetLastReleaseDate←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | c←p GetCommits'' 6 | b←'Release '∘≡¨8↑¨c.Message 7 | (b⍳1)⊃c.Date,⊂'' 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetNextVersion-89.aplf: -------------------------------------------------------------------------------- 1 | GetNextVersion←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ 'major'|'minor'| 'patch' | '' (for patch) | 'i.j.k' 4 | ⍺←0 5 | 2=+/⍵='.':⍵ 6 | p←GetProjectFolder ⍺ 7 | j←⍵,(0=≢⍵)/'patch' 8 | b←'major' 'minor' 'patch'∊⊂j 9 | t←p GetTags'' 10 | 0=≢t.Tag:'0.0.0' 11 | v←t.MostRecentVersion 12 | n←b+v×⌽∨\⌽b 13 | FormatVersion n 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetPackageVersions-409.aplf: -------------------------------------------------------------------------------- 1 | GetPackageVersions←{ 2 | ⍝ ⍵ ←→ URL 3 | u←⍵ 4 | c←'ls-remote --tags --refs ',u 5 | r←RunProcess'git'c 6 | v←{↑⌽⍵⊂⍨⍵≠'/'}¨r.StdOut 7 | n←FormatVersion¨v 8 | v[⍒n] 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetProjectFolder-409.aplf: -------------------------------------------------------------------------------- 1 | GetProjectFolder←{ 2 | ⍝ ⍵ ←→ Project Folder 3 | ⍝ or Project Space 4 | ⍝ or 0, in context 5 | pf←FixPath ⍵ 6 | 0=80|⎕DR ⍵:∊1 ⎕NPARTS pf,'/' 7 | p←GetProjectSpace pf 8 | p=0:'' 9 | p.AcreConfig.ProjectFolder 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetProjectSpace-409.aplf: -------------------------------------------------------------------------------- 1 | GetProjectSpace←{ 2 | ⍝ ⍵ ←→ ProjectSpace 3 | ⍝ ⍵ ←→ 0, then look for ProjectSpace in context 4 | ⍝ ⍵ ←→ ProjectFolder 'c:/asdf/ect.' 5 | ⍝ ⍵ ←→ FQP of item, then find space 6 | f←{9=⍵.⎕NC'AcreConfig':⍵ 7 | ⍵=#:0 8 | ∇ ⍵.## 9 | } 10 | 9=⎕NC'⍵':f ⍵ 11 | '#'=↑⍵:f ExistingAncestor ⍵ 12 | 0≡⍵:f↑⌽⎕RSI 13 | r←⎕SE.UCMD']acre.Projects' 14 | s←⍎¨r[;0] 15 | i←s.AcreConfig.ProjectFolder⍳⊂⍵ 16 | i⊃s 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetReleaseArtifactsFolder-80409.aplf: -------------------------------------------------------------------------------- 1 | GetReleaseArtifactsFolder←{ 2 | ⍝ ⍵ ←→ ProjectSpace 3 | ⍵.DistFolder,'ReleaseArtifacts/' 4 | } 5 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetRemoteTags-209.aplf: -------------------------------------------------------------------------------- 1 | GetRemoteTags←{ 2 | a←'ls-remote -t --refs ',⍵.URL 3 | r←RunProcess'git'a 4 | t←{↑⌽⍵⊆⍨'/'≠⍵}¨r.StdOut 5 | s←⎕NS'' 6 | s.Tag←t 7 | s.NumericVersion←FormatVersion¨t 8 | s.MostRecentVersion←↑{⍵[⍒⍵]}s.NumericVersion,⊂3⍴0 9 | s 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetShortHash-109.aplf: -------------------------------------------------------------------------------- 1 | GetShortHash←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | ↑p RunGitCommand'rev-parse --short HEAD' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetStartupEnvironmentVariables-200409.aplf: -------------------------------------------------------------------------------- 1 | GetStartupEnvironmentVariables←{ 2 | ev←0⊃2 ⎕NQ'.' 'GetCommandLineArgs' 3 | evl←2 ⎕NQ'.' 'GetCommandLine' 4 | si←1+≢ev 5 | si+←2×'"'=↑evl 6 | ev(si↓evl) 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetTags-9.aplf: -------------------------------------------------------------------------------- 1 | GetTags←{ 2 | ⍝ ⍺ ←→ [Project Folder| Project/Package Config space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | t←p RunGitCommand'tag' 6 | s←⎕NS'' 7 | s.Tag←t 8 | s.NumericVersion←FormatVersion¨t 9 | s.MostRecentVersion←↑{⍵[⍒⍵]}s.NumericVersion,⊂3⍴0 10 | s 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/GetTempDir-89.aplf: -------------------------------------------------------------------------------- 1 | GetTempDir←{ 2 | (0⊃APLVersion.Build)>16:739⌶0 3 | APLVersion.OS≡'Linux':'/tmp' 4 | ↑0 ⎕NINFO↑⎕CMD'echo %temp%' 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/GitHubCreateRelease-1049.aplf: -------------------------------------------------------------------------------- 1 | GitHubCreateRelease←{ 2 | ⍝ Create release on GitHub 3 | ⍝ ⍵ ←→ Property space 4 | b←⎕NS'' 5 | b.name←⍵.Tag 6 | b.tag_name←⍵.Tag 7 | b.body←⍵.Body 8 | http←⎕SE.SALT.New'HTTPCommand' 9 | http.Headers←1 2⍴'Accept' 'application/vnd.github.v3+json' 10 | http.Headers⍪←'Content-Type' 'application/json' 11 | http.Headers⍪←'Authorization'('token ',⍵.GitToken) 12 | http.URL←⍵.URL,'/releases' 13 | http.Params←⎕JSON b 14 | http.Command←'POST' 15 | r←http.Run 16 | 201≠r.HttpStatus:'Error creating GitHub project.'⎕SIGNAL 11 17 | d←⎕JSON r.Data 18 | 0=≢⍵.Assets:0 19 | ⍵.AssetsURL←d.assets_url 20 | ⍵.AssetsUploadURL←d.upload_url 21 | _←⍵ GitHubReleaseUploadAsset¨⍵.Assets 22 | 0 23 | } 24 | -------------------------------------------------------------------------------- /APLSource/Main-1/GitHubReleaseUploadAsset-82049.aplf: -------------------------------------------------------------------------------- 1 | GitHubReleaseUploadAsset←{ 2 | ⍝ Upload release file asset to existing release 3 | ⍝ ⍺ ←→ Property space 4 | ⍝ ⍵ ←→ Filepath 5 | gct←{ 6 | e←⎕C 2⊃⎕NPARTS ⍵ 7 | e≡'.dll':'application/octet-stream' 8 | e≡'.msi':'application/x-msdownload' 9 | e≡'.zip':'application/zip' 10 | 'application/octet-stream' 11 | } 12 | 13 | percentEncode←{ 14 | r←⊂'%20' 15 | f←' '∘= 16 | ∊r@f ⍵ 17 | } 18 | 19 | rawread←{ ⍝ Read native file ⍵ 20 | t←⍵ ⎕NTIE 0 ⍝ Tie w/nxt avail num< 21 | s←⎕NSIZE t ⍝ Bytes 22 | b←⎕NREAD t 83 s 0 ⍝ Read em all 23 | t←⎕NUNTIE t ⍝ Untie it 24 | b ⍝ Return 25 | } 26 | 27 | http←⎕SE.SALT.New'HTTPCommand' 28 | http.Headers←1 2⍴'Accept' 'application/vnd.github.v3+json' 29 | http.Headers⍪←'Content-Type'(gct ⍵) 30 | http.Headers⍪←'Authorization'('token ',⍺.GitToken) 31 | http.Params←80 ⎕DR rawread ⍵ 32 | http.Command←'POST' 33 | http.WaitTime←600 34 | http.URL←¯13↓⍺.AssetsUploadURL 35 | http.URL,←'?name=',percentEncode∊1↓⎕NPARTS ⍵ 36 | r←http.Run 37 | 201≠r.HttpStatus:'Error GitHub release asset not uploaded.'⎕SIGNAL 11 38 | 0 39 | } 40 | -------------------------------------------------------------------------------- /APLSource/Main-1/GroupAndName-121.aplf: -------------------------------------------------------------------------------- 1 | GroupAndName←{ 2 | 0=⍵.⎕NC'URL':¯2↑⎕NPARTS ⍵.ProjectFolder 3 | dg dn←¯2↑{⍵⊆⍨~⍵∊':/'}⍵.URL 4 | g←⍵ DefaultParameter'Group'dg 5 | n←⍵ DefaultParameter'Name'dn 6 | g n 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/Initialize-1.aplf: -------------------------------------------------------------------------------- 1 | Initialize←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ Enhance an Acre Project to a Git Repository 4 | ⍝ ..... 5 | ⍝ After this, use GitHub to create a new repository 6 | ⍝ then get the URL and run AddToGitHub. 7 | ⍺←0 8 | p←GetProjectFolder ⍺ 9 | ⎕←p RunGitCommand'init' 10 | ⎕←p RunGitCommand'add .' 11 | ⎕←p RunGitCommand'commit -m ','"~First commit"' 12 | 'Done' 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/InstallUCMD-781.aplf: -------------------------------------------------------------------------------- 1 | InstallUCMD←{ 2 | p←↑⎕NPARTS ⎕WSID 3 | o←⎕SE.SALT.Settings'cmddir' 4 | e←(';'≠o)⊆o 5 | f←{¯3↑(~⍵∊'\/')⊆⍵} 6 | k←~(f p)∘≡¨f¨e 7 | n←1↓∊';',¨(⊂p),k/e 8 | _←⎕SE.SALT.Settings'cmddir "',n,'" -permanent' 9 | 0 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/IsDirty-5.aplf: -------------------------------------------------------------------------------- 1 | IsDirty←{ 2 | ⍝ Are there uncommited changes? 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | 0<≢p RunGitCommand'status --short' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/IsNetCore-25.aplf: -------------------------------------------------------------------------------- 1 | IsNetCore←{ 2 | c←'1'≡↑2 ⎕NQ'.' 'GetEnvironment' 'DYALOG_NETCORE' 3 | c∨←'W'≠↑0⊃'#'⎕WG'APLVersion' 4 | c 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/IsRebased-5.aplf: -------------------------------------------------------------------------------- 1 | IsRebased←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | cb←p GetCommits'' 6 | cm←p GetCommits'master' 7 | (0⊃cm.Hash)≡(1⊃cb.Hash) 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/IsSquashed-5.aplf: -------------------------------------------------------------------------------- 1 | IsSquashed←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | c←p GetCommits'' 6 | b←p GetCurrentBranch'' 7 | ca←↑p RunGitCommand'merge-base master ',b 8 | (7↑ca)≡1⊃c.Hash 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/LoadApplication-11.aplf: -------------------------------------------------------------------------------- 1 | LoadApplication←{ 2 | ⍝ ⍵ ←→ FQP to app folder (e.g., c:\...\Assets\Runtime\MyApp) 3 | ⍝ ← ←→ API/Entry space 4 | ps←GetProjectSpace 0 5 | p n←2↑⎕NPARTS ⍵ 6 | s←⍎('zApps.',n)ps.⎕NS'' 7 | _←s.⎕CY ⍵,'/',n,'.dws' 8 | m←s SetupApplication ⍵,'/' 9 | GetAPISpace m 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/Log-1.aplf: -------------------------------------------------------------------------------- 1 | Log←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p RunGitCommand'log --oneline' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/ManifestEntry-101.aplf: -------------------------------------------------------------------------------- 1 | ManifestEntry←{ 2 | s←⎕NS'' 3 | s.URL←⍵.URL 4 | s.Version←⍵.Version 5 | s.Folder←⍵.ProjectFolderName 6 | s.ProjectSpace←⍵._ProjectSpace 7 | ⍵.IsPackage:s 8 | p←⍵.ProjectFolder 9 | s.Branch←p GetCurrentBranch 0 10 | s.Hash←p GetShortHash 0 11 | s.State←(p IsDirty 0)⊃'Clean' 'Dirty' 12 | s 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/MergeFeatureBranch-1021.aplf: -------------------------------------------------------------------------------- 1 | MergeFeatureBranch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Commit Message 4 | ⍝ If '', defaults to branch name 5 | ⍺←0 6 | p←GetProjectFolder ⍺ 7 | p≡'':'Not in project' 8 | b←p GetCurrentBranch'' 9 | t f←('/'≠b)⊆b 10 | m←⍵,(0=≢⍵)/' '@('-'∘=)f 11 | t≢'feature':b,' is not a feature branch' 12 | p IsDirty'':'Not merged: uncommitted changes on branch.' 13 | ⎕←p Squash m 14 | ⎕←⊃p RunGitCommand'fetch origin master:master' 15 | ~p IsRebased'':'Not merged: branch "',b,'" not rebased to master.' 16 | ⎕←⊃p RunGitCommand'checkout master' 17 | ⎕←⊃p RunGitCommand'merge --ff-only ',b 18 | ⎕←⊃p DeleteBranch b 19 | ⎕←⊃p PushMaster'' 20 | p RefreshProject 0 21 | } 22 | -------------------------------------------------------------------------------- /APLSource/Main-1/NStoScript-13.aplf: -------------------------------------------------------------------------------- 1 | NStoScript←{ 2 | n←⍵.⎕NL ¯2 3 | v←⊆¨⍵⍎¨n 4 | q←{'''',⍵,''''} 5 | p←⊂4⍴' ' 6 | s←{1↓↑,/' ',¨q¨⍵}¨v 7 | t←p,¨n,¨'←',¨s 8 | r←⊂':Namespace' 9 | r,←t 10 | r,←⊂':EndNamespace' 11 | r 12 | } 13 | -------------------------------------------------------------------------------- /APLSource/Main-1/NewFeatureBranch-409.aplf: -------------------------------------------------------------------------------- 1 | NewFeatureBranch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ 'feature-name' 4 | ⍝ 5 | ⍺←0 6 | p←GetProjectFolder ⍺ 7 | p≡'':'Not in project' 8 | n←'-'@(' '∘=)⍵ 9 | p IsDirty'':'Uncommited changes.' 10 | ⎕←⊃p PullMaster'' 11 | ⎕←⊃p RunGitCommand'checkout -b feature/',n,' master' 12 | p RefreshProject 0 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/NewReleaseBranch-409.aplf: -------------------------------------------------------------------------------- 1 | NewReleaseBranch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ 'x.y.z' [base] ←→ Version to Create or Patch 4 | ⍝ If ⍵ does not exist, create ⍵ 5 | ⍝ If ⍵ does exist, create ⍵+0 0 1 6 | ⍺←0 7 | v←⍵ 8 | p←GetProjectFolder ⍺ 9 | p IsDirty'':'Uncommited changes.' 10 | q m←2↑(⊆⍵),⊂'master' 11 | t←p GetTags'' 12 | e←(⊂v)∊t.Tag 13 | n←FormatVersion v 14 | r←FormatVersion n+0 0 e 15 | (⊂r)∊t.Tag:'Target version ',r,' already exists.' 16 | bn←'release/',r 17 | _←p DeleteBranch'-D ',bn 18 | ⍝ ⎕←⊃p PullMaster'' 19 | ⎕←⊃p RunGitCommand'checkout -b ',bn,' ',e⊃m v 20 | _←p SetConfigParam'Version'r 21 | ⍝ _←p RefreshProject 0 22 | bn 23 | } 24 | -------------------------------------------------------------------------------- /APLSource/Main-1/OnSessionStart-205.aplf: -------------------------------------------------------------------------------- 1 | OnSessionStart←{ 2 | ⎕SE≠⎕THIS:{_←⎕SE.⎕FX ⎕CR'OnSessionStart' ⋄ _←⎕SE.⎕FX ⎕CR'UCMD' ⋄ ⎕SE.OnSessionStart ⍵}⍵ 3 | 4 | ⎕IO ⎕ML←0 1 5 | d←'/',⍨⊃{(';'≠⍵)⊆⍵}⎕SE.SALT.Settings'cmddir' 6 | ~⎕NEXISTS d:0 7 | f←⊃(⎕NINFO⍠1)d,'*.dyalog' 8 | 0=≢f:0 9 | 10 | exe←{ 11 | 3≠⍺.⎕NC ⍵:0 12 | 0=0 0⊃⍺.⎕AT ⍵:⍺⍎⍵ 13 | (⍺⍎⍵)0 14 | } 15 | 16 | exeList←{ 17 | 6::⍬ 18 | l←,⍺⍎⍵ 19 | 0=≢l:⍬ 20 | l.SourceFile←⊂⍺.SourceFile 21 | l.FullName←l.Group{⍺,'.',⍵}¨l.Name 22 | l 23 | } 24 | 25 | fix←d∘{ 26 | ⎕IO ⎕ML←0 1 27 | n←⍺,(1⊃⎕NPARTS ⍵),'.dyalog' 28 | r←0 ⎕FIX'file://',n 29 | r.SourceFile←n 30 | r.Include←⍺∘∇ 31 | r 32 | } 33 | 34 | l←∊{ 35 | ⎕←'Doing: ',⍵ 36 | s←fix ⍵ 37 | _←s exe'OnSessionStart' 38 | s exeList'List' 39 | }¨f 40 | 0=≢l:0 41 | _←'Dado'⎕SE.⎕NS'' 42 | ⎕SE.Dado.UserCommands←l 43 | _←2350⌶l.Group{']',⍺,'.',⍵}¨l.Name 44 | 0 45 | 46 | } 47 | -------------------------------------------------------------------------------- /APLSource/Main-1/OpenOrLoad-51.aplf: -------------------------------------------------------------------------------- 1 | OpenOrLoad←{ 2 | ⍝ ⍵ ←→ Project or Package Folder 3 | v←⍵.IsPackage 4 | t←v/' -track=off' 5 | q←{'"',⍵,'"'} 6 | pf←q ⍵.ProjectFolder 7 | ps←⍵._ProjectSpace 8 | ⎕SE.UCMD'Acre.OpenProject ',pf,' ',ps,' -dependencies=off',t 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/OpenProject-11.aplf: -------------------------------------------------------------------------------- 1 | OpenProject←{ 2 | ⍝ ⍵ ←→ Project Folder (-f option ←→ force package over existing project) 3 | pf b←ProcessOpenArg ⍵ 4 | c←GetConfigSpace pf 5 | c.LocalProjects←RetrieveLocalProjects pf 6 | c.SignalError←0 7 | c.ProjectOverride←~b 8 | dp←RetrieveDependencies c 9 | dp←dp~0 ⍝ various reasons this could happen. ??? 10 | n←OpenOrLoad¨⌽dp 11 | _←SetAttributes¨dp 12 | _←SetupWorkspace,⍎¨n 13 | ⎕←'Current branch: ',pf GetCurrentBranch'' 14 | ↑⌽n 15 | } 16 | -------------------------------------------------------------------------------- /APLSource/Main-1/PackageFQP-381.aplf: -------------------------------------------------------------------------------- 1 | PackageFQP←{ 2 | ⍝ ⍵ ←→ Dependency space 3 | p←↑⎕NPARTS ¯1↓↑⍵.LocalProjects.ProjectFolder 4 | f←p,'.APLPackageCache/' 5 | g n←¯2↑{⍵⊆⍨~⍵∊':/'}⍵.URL 6 | _←1 ⎕MKDIR f 7 | f,1↓∊' ',¨g n(⍵.Version,'/') 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/ProcessFileLine-881.aplf: -------------------------------------------------------------------------------- 1 | ProcessFileLine←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ File Line 4 | ⍝ ⍺ Project Space 5 | ⍝ ← ←→ ⍵ with item name replacing file name. 6 | ⍺←0 7 | pf←GetProjectFolder ⍺ 8 | ~∨/'APLSource/'⍷⍵:⍵ 9 | b←' '≠⍵ 10 | p←1++\b≠¯1↓0,b 11 | t←p⊆⍵ 12 | ↑,/(⊂pf)FileNameToItemName¨t 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/ProcessLog-81.aplf: -------------------------------------------------------------------------------- 1 | ProcessLog←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Results of git log (with --name-status) 4 | ⍝ ⍺ ←→ Project Space 5 | ⍺←0 6 | p←GetProjectFolder ⍺ 7 | l←⍵~⊂'' 8 | b←'*'=↑¨l 9 | cl←b/l 10 | fl←DecodeOctalEncoding¨(~b)/l 11 | n←{¯1+-2-/⍸⍵,1}b ⍝ Lines/Files per commit 12 | cc←≢cl 13 | ch un cd←↓⍉⊃{(','≠⍵)⊆⍵}¨cl 14 | ts←↓(cc,6)⍴1⊃' -:'⎕VFI,20↑[1]⊃cd 15 | q←{(' '≠⍵)⊆⍵}¨fl 16 | fs←0⊃¨q 17 | rn←'R'=↑¨fs 18 | fn1←1⊃¨q 19 | fn2←2⊃¨q,¨⊂⊂'' 20 | s←⎕NS'' 21 | s.OK←{(2=⍵)∨rn∧3=⍵}≢¨q ⍝ If not, probably due to blanks in file name 22 | s.IsAPLItem←'APLSource/'∘≡¨10↑¨fn1 23 | s.FileName1←fn1 24 | s.FileName2←fn2 25 | s.APLItemName1←s.IsAPLItem\p FileNamesToItemNames s.IsAPLItem/fn1 26 | s.APLItemName2←s.IsAPLItem\p FileNamesToItemNames s.IsAPLItem/fn2 27 | s.Status←↑¨fs 28 | s.Deleted←'D'=s.Status 29 | s.Renamed←'R'=s.Status 30 | s.CommitHash←n/1↓¨ch 31 | s.CommitBy←n/un 32 | s.CommitDate←n/cd 33 | s.CommitTS←n/ts 34 | s.FileName←,1↑s.Renamed⊖⊃fn1 fn2 35 | s.APLItemName←,1↑s.Renamed⊖⊃s.APLItemName1 s.APLItemName2 36 | s.Exists←0<⎕NC s.APLItemName 37 | s.MostRecent←s.IsAPLItem∧≠s.APLItemName 38 | s 39 | } 40 | -------------------------------------------------------------------------------- /APLSource/Main-1/ProcessOpenArg-881.aplf: -------------------------------------------------------------------------------- 1 | ProcessOpenArg←{ 2 | ⍝ Process project path for Environment variables and leading blanks. 3 | ⍝ ⍵ ←→ Project Folder, project override flag 4 | a←⌽dlb⌽⍵ 5 | b←' -f'≡¯3↑a 6 | f←a↓⍨bׯ3 7 | (ExpandProjectPath f)b 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/ProcessPackageNotes-4081.aplf: -------------------------------------------------------------------------------- 1 | ProcessPackageNotes←{ 2 | ⍝ ⍺ ←→ 1, add header 3 | p←(~⍵∊⊂'')⊆⍵ ⍝ Partition 4 | d←¯19↑¨↑¨p ⍝ Release Date 5 | ~⍺:d p 6 | p←{z←⍵ ⋄ z[0]←⊂'#',0⊃⍵ ⋄ z}¨p ⍝ Add heading level 7 | d p ⍝ Dates and Notes 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/ProjectFolder-81.aplf: -------------------------------------------------------------------------------- 1 | z←ProjectFolder 2 | ⍝ This is fixed inside the config space 3 | ⍝ It does NOT run from here. 4 | z←{ 5 | f←ProjectFolderName,'/' 6 | ∨/(⍕⎕SE)⍷⍕⎕THIS:f,⍨##.##.ApplicationFolder 7 | 0<≢⎕WSID:f,⍨↑1 ⎕NPARTS ⎕WSID 8 | s←⎕NS'' 9 | s.⎕USING←'System' 'System.Diagnostics,System.dll' 10 | p←s.Process.GetCurrentProcess 11 | f,⍨↑⎕NPARTS p.MainModule.FileName 12 | }0 13 | -------------------------------------------------------------------------------- /APLSource/Main-1/ProjectSpace-81.aplf: -------------------------------------------------------------------------------- 1 | ProjectSpace←{ 2 | ⍝ ⍺ ←→ Dependency space 3 | ⍝ ⍵ ←→ Config space 4 | g←⍵._Group 5 | n←⍵._Name 6 | 0=⍵.⎕NC'Version':⍵.ProjectSpace 7 | v←'_'@('.'∘=)⍵.Version 8 | d←'#.',g,'_',n,'_',v 9 | p←'ProjectSpace' 10 | s←⍺ DefaultParameter p'' 11 | s≡,'*':d 12 | '#'≡↑s:s 13 | r←⍵ DefaultParameter p('#.',n) 14 | r≡,'*':d 15 | r 16 | } 17 | -------------------------------------------------------------------------------- /APLSource/Main-1/Provanto-1.apln: -------------------------------------------------------------------------------- 1 | :Namespace Provanto 2 | ⍝ URL: https://github.com/the-carlisle-group/Provanto 3 | ⍝ Version: 0.0.3 4 | ⍝ Build date: March 1, 2023 5 | ⎕IO ⎕ML←0 1 6 | Assert←{ 7 | 0⊣'TEST FAILED'⎕SIGNAL 789/⍨~⍵ 8 | } 9 | Coverage←{ 10 | ~⍵.Profile:¯1 '' 11 | s←Spaces⍕⍵.CodeSpace 12 | s,←Spaces⍕⍵.TestSpace 13 | n←s.⎕NL⊂-3 4 14 | p←'.',¨⍨⍕¨s 15 | af←⊃,/p{⍺∘,¨⍵}¨n 16 | d←⎕PROFILE'data' 17 | b←d[;1]∊⊂⍬ 18 | ef←b/d[;0] 19 | el←(+\b)⊆d[;1] 20 | nr←(⎕NR¨af)~¨⊂⊂' }' 21 | al←⍳¨≢¨nr 22 | ul←al~¨(el,⊂⍬)[ef⍳af] 23 | c←100×1-÷/≢¨∊¨ul al 24 | k←0<≢¨ul 25 | uf←~af∊ef 26 | (uf/ul)←⊂⍬ 27 | z←k/af{0=≢⍵:⍺ ⋄ ⍺,'[',(⍕⍵),']'}¨ul ⍝ 28 | c z 29 | } 30 | DisplayCodeCoverage←{ 31 | ⍵.Quiet>1:0 32 | ~⍵.Profile:0 33 | ⎕←'Code coverage: ',,'Q<%>I4'⎕FMT ⍵.Coverage 34 | ⍵.Coverage=100:0 35 | ⎕←'Untested code:' 36 | ⎕←↑{25>≢⍵:⍵ ⋄ (10↑⍵),⊂'... and ',(⍕¯10+≢⍵),' more.'}⍵.Untested 37 | 0 38 | } 39 | DisplaySuite←{ 40 | ⍺.Quiet>1:0 41 | r←⍵.Result 42 | h←'Number of tests:'(≢r) 43 | ⎕←'*'⍪(⍕h⍪⍺.Status,⍪+⌿r∘.=⍳5)⍪'*' 44 | 0 45 | } 46 | DisplayTotal←{ 47 | ⍵.Quiet>1:0 48 | n←≢⍵.Suites 49 | n=1:0 50 | r←⊃,/⍵.Results.Result 51 | h←('Total number of tests in ',(⍕n),' suites:')(≢r) 52 | ⎕←'*'⍪(⍕h⍪⍵.Status,⍪+⌿r∘.=⍳5)⍪'*' 53 | 0 54 | } 55 | Execute←{ 56 | s f←⍵ 57 | 0=⍺.⎕NC f:0 58 | (⍺⍎f),' s' 59 | } 60 | Run←{ 61 | ⍝ ⍺ ←→ [Stop 0|1 [Quiet 0|1|2]] 62 | ⍝ ⍵ ←→ Test space, [Code space] 63 | ⍝ ← ←→ Result space 64 | ⍺←0 65 | z←⎕NS'' 66 | z.(Stop Quiet)←2↑⍺ 67 | z.(TestSpace CodeSpace)←2↑⍵,0 68 | z.(Status DecoratedStatus)←Status'' 69 | z.Suites←{⍵↓⍨1<≢⍵}Spaces⍕z.TestSpace 70 | z.IsSuite←z.TestSpace≠⊃z.Suites 71 | z.Profile←z.CodeSpace≠0 72 | p←⎕PROFILE⍣z.Profile 73 | e←z.TestSpace∘Execute⍣z.IsSuite 74 | _←e z'Startup' 75 | _←p¨'Clear'('Start' 'coverage') 76 | z.Results←z RunSuite¨z.Suites 77 | _←p'stop' 78 | _←e z'Teardown' 79 | z.(Coverage Untested)←Coverage z 80 | _←p'clear' 81 | _←DisplayTotal z 82 | 1:z←z⊣DisplayCodeCoverage z 83 | } 84 | RunSuite←{ 85 | _←⍵ Execute ⍺'Startup' 86 | ⎕←'Running suite: ',⍕⍵ 87 | _←⍵.⎕FX¨⎕NR¨'Assert' 'Try' 88 | r←⎕NS'' 89 | f←⍵.⎕NL ¯3 90 | r.Function←f/⍨'Test'∘≡¨4↑¨f 91 | p←r.Function{⍵,'.',⍺}¨⊂⍕⍵ 92 | r.Result←⍺ RunTest¨p 93 | _←⍵ Execute ⍺'Teardown' 94 | r⊣⍺ DisplaySuite r 95 | } 96 | RunTest←{ 97 | r←⍺{ 98 | 0/⍨~⍺.Stop::1+789≠⎕DMX.EN 99 | ⍎⍵,' 0' 100 | }⍵ 101 | ⍺.Quiet>0:r 102 | r⊣⎕←(r⊃⍺.DecoratedStatus),' ',⍵ 103 | } 104 | Spaces←{ 105 | ⍵≢⍕⍎⍵:⍬ 106 | s←⍵∘,¨'.',¨(⍎⍵).⎕NL ¯9 107 | 0=≢s:,⍎⍵ 108 | ∊(⍎⍵),∇¨s 109 | } 110 | Status←{ 111 | s←'Passed' 'Failed' 'Broken' 'N/A' 'Disabled' 112 | d←↓(↑':',¨⍨s),' ',↑3/¨' !!--' 113 | s d 114 | } 115 | Try←{ 116 | ⍺←⊢ 117 | 0::⎕DMX.EN 118 | 0⊣⍺ ⍺⍺ ⍵ 119 | } 120 | :EndNamespace 121 | -------------------------------------------------------------------------------- /APLSource/Main-1/PullMaster-11.aplf: -------------------------------------------------------------------------------- 1 | PullMaster←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ n/a 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | b←p GetCurrentBranch'' 7 | p IsDirty'':'Uncommitted changes.' 8 | b≢'master':p RunGitCommand'fetch origin master:master' 9 | ⎕←⊃p RunGitCommand'fetch origin' 10 | p RunGitCommand'merge --ff-only origin/master' 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/Push-1.aplf: -------------------------------------------------------------------------------- 1 | Push←{ 2 | ⍝ Push Current Branch 3 | ⍝ ⍺ ←→ [Project Folder|Space] 4 | ⍝ ⍵ ←→ n/a 5 | ⍺←0 6 | p←GetProjectFolder ⍺ 7 | b←p GetCurrentBranch'' 8 | p RunGitCommand'push origin ',b 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/PushMaster-11.aplf: -------------------------------------------------------------------------------- 1 | PushMaster←{ 2 | ⍝ ⍺ ←→ [ProjectSpace] 3 | ⍝ ⍵ ←→ n/a 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | p≡'':'Not in project' 7 | p RunGitCommand'push origin master' 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/QuadAT-31.aplf: -------------------------------------------------------------------------------- 1 | QuadAT←{ 2 | ⍝ To avoid limit error. 3 | ⍝ ⍺ ←→ Optional Values to set 4 | ⍝ ⍵ ←→ Names to get or set 5 | ⎕ML←1 6 | p←(≢⍵)⍴4095↑1 7 | 0=⎕NC'⍺':⊃⍪/⎕AT¨p⊂⍵ 8 | (p⊂[0]⍺)(1159⌶)¨p⊂⍵ 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/REFS-f.aplf: -------------------------------------------------------------------------------- 1 | REFS←{ 2 | ⍺←⍬ 3 | ⍵∊⍺:⍺ ⍝ Been here, done that 4 | n←↓⍵.⎕NL 9 ⍝ List of sub items to investigate 5 | 0=≢n:⍺,⍵ ⍝ None, so return all items investigated previously, plus the current item 6 | ⍝ why union and not catenate? Ah it is now!!!! 7 | s←⍵⍎¨n ⍝ Prep items 8 | ⍝ ↑∇⍨/⌽(⊂⍺,⍵),s ⍝ CANNOT USE EACH HERE! 9 | ↑∇⍨/s,⊂⍺,⍵ 10 | 11 | ⍝ each call has to be done sequentially. Unless we use a global somewhere to accumulate 12 | ⍝ Stuff we have seen 13 | 14 | 15 | 16 | ⍝ refs←{ ⍝ Vector of sub-space references for ⍵. 17 | ⍝ ⍺←⍬ ⋄ (≢⍺)↓⍺{ ⍝ default exclusion list. 18 | ⍝ ⍵∊⍺:⍺ ⍝ already been here: quit. 19 | ⍝ ⍵.(↑∇∘⍎⍨/⌽(⊂⍺∪⍵),↓⎕NL 9) ⍝ recursively traverse any sub-spaces. 20 | ⍝ }⍵ ⍝ for given starting ref. 21 | ⍝ } 22 | ⍝ 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /APLSource/Main-1/ReadConfigFile-411.aplf: -------------------------------------------------------------------------------- 1 | ReadConfigFile←{ 2 | ⍝ Read JSON, NSSccipt or (trivial) APLAN. 3 | ⍝ ⍵ ←→ FQP of Config File Name 4 | ⍝ ← ←→ Config Space 5 | ⍝ See FormatConfigSpace for inverse. 6 | r←↑⎕NGET ⍵ 1 7 | fix←{⎕NS(0 ⎕FIX ⍵).(⎕NS ⎕NL 2)} 8 | ⍝ set←{⍵._FileType←⍺ ⋄ ⍵} 9 | set←{⍵._FileType←'JSON' ⋄ ⍵} 10 | t←↑↑r 11 | '{'=t:'JSON'set #.⎕JSON∊r 12 | ':'=t:'NSScript'set fix r 13 | r[0]←⊂':Namespace' 14 | r←(¯1↓r),⊂':EndNamespace' 15 | 'APLAN'set fix r 16 | } 17 | -------------------------------------------------------------------------------- /APLSource/Main-1/RebaseContinue-41.aplf: -------------------------------------------------------------------------------- 1 | RebaseContinue←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | ⎕←p RunGitCommand'add --all' 7 | ⎕←p RunGitCommand'rebase --continue' 8 | 'Rebase complete.' 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/RebaseFeatureBranch-2041.aplf: -------------------------------------------------------------------------------- 1 | RebaseFeatureBranch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | p IsDirty'':'Uncommitted changes.' 7 | b←p GetCurrentBranch'' 8 | t f←('/'≠b)⊆b 9 | t≢'feature':b,' is not a feature branch' 10 | _←p Squash'' 11 | ⎕←⊃p RunGitCommand'fetch origin master:master' 12 | r←p RunGitCommand'rebase master' 13 | ⎕←⊃p∘ProcessFileLine¨r 14 | _←p RefreshProject'' 15 | ~p IsDirty'':'Rebase complete.' 16 | 'Manually merge, then run RebaseContinue' 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/RefreshProject-81.aplf: -------------------------------------------------------------------------------- 1 | RefreshProject←{ 2 | ⍝ ⍺ ←→ Project Folder 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | s←GetProjectSpace p 6 | ⎕SE.UCMD']acre.Refresh ',⍕s 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/ReleaseNewVersion-481.aplf: -------------------------------------------------------------------------------- 1 | ReleaseNewVersion←{ 2 | ⍝ ⍺ ←→ Project Name 3 | ⍝ ⍵ ←→ 'major'|'minor'| 'patch' | '' (for patch) | 'i.j.k' 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | p≡'':'Not in project' 7 | v←p CreateNewVersion ⍵ 8 | _←p Build v 9 | ⍝ ⎕←⊃p PushMaster'' 10 | ⎕←⊃p RunGitCommand'push --follow-tags origin master' 11 | s←GetProjectSpace ⍺ 12 | _←s Execute'OnRelease' 13 | _←p ReleaseOnGitHub v 14 | 0 15 | } 16 | -------------------------------------------------------------------------------- /APLSource/Main-1/ReleaseOldPatch-481.aplf: -------------------------------------------------------------------------------- 1 | ReleaseOldPatch←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | b←p GetCurrentBranch'' 6 | t v←('/'≠b)⊆b 7 | 'release'≢t:b,' is not a release branch' 8 | _←p Squash'Release ',v 9 | _←p BuildPackage 0 0 10 | _←p BuildApplication'' 11 | _←p BuildReleaseArtifacts'' 12 | ⎕←⊃p RunGitCommand'tag -a ',v,' -m "Version ',v,'"' 13 | ⎕←⊃p RunGitCommand'checkout master' 14 | ⎕←⊃p RunGitCommand'merge -s ours ',b 15 | ⎕←⊃p DeleteBranch b 16 | ⎕←⊃p PushMaster'' 17 | v 18 | } 19 | -------------------------------------------------------------------------------- /APLSource/Main-1/ReleaseOnGitHub-1281.aplf: -------------------------------------------------------------------------------- 1 | ReleaseOnGitHub←{ 2 | ⍝ ⍵ ←→ Version e.g. '1.2.3' 3 | ⍺←0 4 | v←⍵ 5 | p←GetProjectFolder ⍺ 6 | s←GetConfigSpace p 7 | df←s.DistFolder 8 | af←df,'Application/',s._Name,'/' 9 | r←⎕NS'' 10 | r.Body←0⊃⎕NGET af,'MarginalReleaseNotes.md' 11 | r.Tag←⍵ 12 | r.Assets←↑(⎕NINFO⍠1)df,'ReleaseArtifacts/*.*' 13 | r.URL←'https://api.github.com/repos/',19↓s.URL 14 | r.GitToken←GetGithubToken p,'../' 15 | r←GitHubCreateRelease r 16 | 'Done' 17 | 18 | } 19 | -------------------------------------------------------------------------------- /APLSource/Main-1/RemoveDevelopmentPackages-20041.aplf: -------------------------------------------------------------------------------- 1 | RemoveDevelopmentPackages←{ 2 | 0=≢⍵:'' 3 | d←{6::0 ⋄ ⍵.Development}¨⍵ 4 | (~d)/⍵ 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/ResolveVersion-81.aplf: -------------------------------------------------------------------------------- 1 | ResolveVersion←{ 2 | ⍝ ⍺ ←→ URL 3 | ⍝ ⍵ ←→ Version '1.2.3' or '2.∧.∧' 4 | ⍝ ← ←→ Resolved '2.3.4' 5 | ~'^'∊⍵:⍵ 6 | v←GetPackageVersions ⍺ 7 | 0=≢⍵:↑v 8 | j n p←FormatVersion ⍵ 9 | aj an ap←↓⍉⊃FormatVersion¨v 10 | j=¯1:↑v 11 | n=¯1:↑(j=aj)/v 12 | ↑((j=aj)∧n=an)/v 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/Restore-1.aplf: -------------------------------------------------------------------------------- 1 | Restore←{ 2 | ⍝ Restore an item to previous version 3 | ⍝ ⍵[0] ←→ ItemName (the fully qualified namespace path) 4 | ⍝ ⍵[1] ←→ Optional commit hash 5 | ⍺←0 6 | n c←⍵ 7 | p←GetProjectSpace ⍺ 8 | fn←'sourcefile'⎕SE.acre.run n 9 | rn←(≢p.AcreConfig.ProjectFolder)↓fn 10 | 11 | 12 | ⎕←p RunGitCommand'checkout ',c,' -- ',rn 13 | 14 | 15 | ⍝ ⎕←p RunGitCommand'checkout HEAD~',(⍕n),' -- ',rn 16 | p RefreshProject 0 17 | 18 | 19 | } 20 | -------------------------------------------------------------------------------- /APLSource/Main-1/Retrieve-1.aplf: -------------------------------------------------------------------------------- 1 | Retrieve←{ 2 | ⍝ ⍺ ←→ Project Folder 3 | ⍝ ⍵ ←→ Version 4 | ⍝ ← ←→ Config Spaces 5 | 746::⎕DMX.EM ⎕SIGNAL ⎕DMX.EN 6 | c←GetConfigSpace ⍺ 7 | d←⎕NS'' 8 | d.URL←c.URL 9 | d.Version←⍵ 10 | d.LocalProjects←RetrieveLocalProjects ⍺ 11 | d.SignalError←1 12 | d.ProjectOverride←0=≢⍵ 13 | d.Token←GetGithubToken c.ProjectsFolder 14 | pc←RetrieveDependency d 15 | RetrieveDependencies pc 16 | } 17 | -------------------------------------------------------------------------------- /APLSource/Main-1/RetrieveDependencies-101.aplf: -------------------------------------------------------------------------------- 1 | RetrieveDependencies←{ 2 | ⍝ ⍺ ←→ Already retrieved spaces 3 | ⍝ ⍵ ←→ Project or Package Config Space 4 | ⍝ ← ←→ Dependent project or package config spaces 5 | ⍝ N.B. Recursive technique adapted from J. Scholes dfns.refs 6 | ⍺←⍬ 7 | d←{6::'' ⋄ ⍵.Dependencies}⍵ 8 | 0=≢d:⍺,⍵ 9 | d.LocalProjects←⊂⍵.LocalProjects 10 | d.SignalError←⍵.SignalError 11 | d.ProjectOverride←⍵.ProjectOverride 12 | d.Token←⊂GetGithubToken ⍵.ProjectsFolder 13 | c←RetrieveDependency¨d 14 | c.Development←{6::0 ⋄ ⍵.Development}¨d 15 | n←~c.(URL Version)∊{0=≢⍵:'' ⋄ ⍵.(URL Version)}⍺ 16 | ↑∇⍨/(n/c),⊂⍺,⍵ 17 | } 18 | -------------------------------------------------------------------------------- /APLSource/Main-1/RetrieveDependency-101.aplf: -------------------------------------------------------------------------------- 1 | RetrieveDependency←{ 2 | ⍝ ⍵ ←→ Dependency Space 3 | ⍝ ← ←→ Project or Package Config Space 4 | ⍝ Do not replace ⎕CMD below with RunProcess. See issue #53 5 | 0=⍵.⎕NC'URL':⍵ DependencyError'No URL specfied' 6 | 0=⍵.⎕NC'Version':⍵ DependencyError'No version specified' 7 | u←⍵.URL 8 | v←⍵.Version 9 | lp←⍵.LocalProjects 10 | jf←(lp.URL⍳⊂u)⊃(lp.ProjectFolder),⊂'' 11 | ⍵.ProjectOverride∧jf≢'':⍵ GetConfigSpace jf 12 | kf←PackageFQP ⍵ 13 | ⎕NEXISTS kf:⍵ GetConfigSpace kf 14 | _←{⍵≡'':0 ⋄ ⍵ PullMaster''}jf 15 | u←(jf≢'')⊃u('file://',jf) 16 | kn←∊1↓⎕NPARTS ¯1↓kf 17 | ⎕←'Retrieving "',kn,'" from ',u,'...' 18 | au←⍵.Token AddTokenToURL u 19 | sw←'--depth 1 --branch ',v 20 | q←{'"',⍵,'"'} 21 | l←1↓∊' ',¨'clone'sw(q au)(q kf) 22 | r←⎕CMD'git ',l 23 | _←DeleteGitItems kf 24 | c←⍵ GetConfigSpace kf 25 | _←DeleteDevSpaceFolders c 26 | _←c.IsApplication DeleteDevFolders c 27 | c 28 | } 29 | -------------------------------------------------------------------------------- /APLSource/Main-1/RetrieveLocalProjects-2101.aplf: -------------------------------------------------------------------------------- 1 | RetrieveLocalProjects←{ 2 | ⍝ ⍵ ←→ Project Folder 3 | p←↑⎕NPARTS ¯1↓⍵ 4 | n t←0 1(⎕NINFO⍠1)p,'*' 5 | b←⎕NEXISTS n,¨⊂'/acre.config' 6 | c←GetConfigSpace¨b/n 7 | (2=∊c.⎕NC⊂'URL')/c 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/RollbackMaster-101.aplf: -------------------------------------------------------------------------------- 1 | RollbackMaster←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ Roll back one commit. 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | b←p GetCurrentBranch'' 7 | b≢'master':'Not on master' 8 | ⎕←p RunGitCommand'reset --hard HEAD~1' 9 | p RefreshProject 0 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/Run-1.aplf: -------------------------------------------------------------------------------- 1 | Run←{ 2 | ⍺←↑⎕NPARTS 2 ⎕NQ'.' 'GetEnvironment' 'load' 3 | f←⍺ 4 | m←⎕JSON∊↑⎕NGET(f,'Manifest.json')1 5 | p←m.Packages 6 | r←{1↓∊'.',¨¯1↓⍵⊆⍨'.'≠⍵}¨p.ProjectSpace 7 | r←⍎¨r ⎕NS¨⊂'' 8 | d←0 #.⎕FIX'file://',f,'Dado.apln' 9 | s←1 r.⎕FIX{'file://',f,⍵,'/APLSource.apln'}¨p.Folder 10 | c←d.GetConfigSpace¨f∘,¨p.Folder 11 | s.AcreConfig←s.⎕NS c 12 | _←d.CheckAPLVersion¨c 13 | _←s∘d.SetReferences¨s 14 | 'Done' 15 | } 16 | -------------------------------------------------------------------------------- /APLSource/Main-1/RunGitCommand-49.aplf: -------------------------------------------------------------------------------- 1 | RunGitCommand←{ 2 | ⍝ ⍺ ←→ ProjectFolder 3 | ⍝ ⍵ ←→ command 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | p≡'':'Not in project' 7 | a←'-C "',p,'" ',⍵ 8 | r←RunProcess'git'a 9 | r.StdOut,r.StdErr 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/RunGitCommand_OLD-1c049.aplf: -------------------------------------------------------------------------------- 1 | RunGitCommand_OLD←{ 2 | ⍝ ⍺ ←→ ProjectFolder 3 | ⍝ ⍵ ←→ command 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | c←'git -C "',p,'" ',⍵,' 2>&1' ⍝ 2>&1 redirects errors to screen, otherwise we don't see them 7 | f←{'UTF-8'⎕UCS ⎕UCS ⍵} 8 | f¨⎕CMD c 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/RunProcess-9.aplf: -------------------------------------------------------------------------------- 1 | RunProcess←{ 2 | ⍝ ⍺ ←→ Format result like ⎕CMD or not 3 | ⍝ ⍵[0] ←→ Executable 4 | ⍝ ⍵[1] ←→ Argument 5 | ⍺←1 6 | _net←⎕NS'' 7 | _net.⎕USING←{ 8 | ⍵:'System' 'System.IO,System.Runtime.Extensions' 'System.Diagnostics,System.Diagnostics.Process' 9 | 'System' 'System.IO' 'System.Diagnostics,System.dll' 10 | }IsNetCore'' 11 | r←⎕NS'' 12 | p←⎕NEW _net.Process 13 | i←p.StartInfo 14 | i.FileName←0⊃⍵ 15 | i.Arguments←1⊃⍵ 16 | i.RedirectStandardOutput←1 17 | i.RedirectStandardInput←1 18 | i.RedirectStandardError←1 19 | i.UseShellExecute←0 20 | i.CreateNoWindow←1 21 | _←p.Start ⍬ 22 | re←⎕NEW _net.StreamReader p.StandardError.BaseStream 23 | ro←⎕NEW _net.StreamReader p.StandardOutput.BaseStream 24 | t←r{⍺.StdErr←⍵.ReadToEnd}&re 25 | r.StdOut←ro.ReadToEnd 26 | op←{6::0 ⋄ z←⍺⍺ ⍵} 27 | _←p.WaitForExit op ⍬ 28 | _←⎕TSYNC op t 29 | r.ExitCode←p.ExitCode 30 | ~⍺:r 31 | rtc←{' '@((⎕UCS 9)∘=)⍵} 32 | pfn←{⍵⊆⍨~⍵∊⎕UCS 10 13} 33 | r.StdOut←pfn rtc r.StdOut 34 | r.StdErr←pfn rtc r.StdErr 35 | r 36 | } 37 | -------------------------------------------------------------------------------- /APLSource/Main-1/RunProcessTest-409.aplf: -------------------------------------------------------------------------------- 1 | RunProcessTest←{ 2 | ⍝ ⍺ ←→ Format result like ⎕CMD or not 3 | ⍝ ⍵[0] ←→ Executable 4 | ⍝ ⍵[1] ←→ Argument 5 | ⍝ ⍵[3] ←→ Standard Input 6 | 7 | w0←0⊃#.GetCommandLineArgs 8 | w1←'maxws=2g' 9 | 10 | w2←⊂'a←⍳10' 11 | w2,←⊂'b←7' 12 | w2,←⊂'c←a+b' 13 | w2,←⊂'(⊂↓⎕NL 2)⎕NPUT''c:\ports\result.txt'' 1' 14 | w2,←⊂'⎕OFF 16' 15 | 16 | 17 | 18 | 19 | 20 | ⍺←1 21 | r←⎕NS'' 22 | ⍝ ⎕USING←'System' 'System.Text' 'System.IO' 'System.Diagnostics,System.dll' 23 | 24 | ⎕USING←'System' 'System.IO' 'System.Diagnostics,System.dll' 25 | 26 | p←⎕NEW Process 27 | i←p.StartInfo 28 | i.FileName←w0 ⍝ 0⊃⍵ 29 | i.Arguments←w1 ⍝ 1⊃⍵ 30 | i.RedirectStandardOutput←1 31 | i.RedirectStandardInput←1 32 | i.RedirectStandardError←1 33 | i.UseShellExecute←0 34 | i.CreateNoWindow←1 35 | _←p.Start ⍬ 36 | in←∊w2,¨⎕UCS 13 37 | sw←⎕NEW StreamWriter p.StandardInput.BaseStream 38 | _←{6::0 ⋄ r←sw.Write⊂in ⋄ r}0 39 | _←{6::0 ⋄ r←sw.Close ⋄ r}0 40 | 41 | t←r{⍺.StdErr←⍵.ReadToEnd}&p.StandardError 42 | r.StdOut←p.StandardOutput.ReadToEnd 43 | op←{6::0 ⋄ z←⍺⍺ ⍵} 44 | _←p.WaitForExit op ⍬ 45 | _←⎕TSYNC op t 46 | r.ExitCode←p.ExitCode 47 | ~⍺:r 48 | rtc←{' '@((⎕UCS 9)∘=)⍵} 49 | pfn←{⍵⊆⍨~⍵∊⎕UCS 10 13} 50 | r.StdOut←pfn rtc r.StdOut 51 | r.StdErr←pfn rtc r.StdErr 52 | r 53 | } 54 | -------------------------------------------------------------------------------- /APLSource/Main-1/RunTests-9.aplf: -------------------------------------------------------------------------------- 1 | RunTests←{ 2 | ⍺←0 3 | p←GetProjectSpace ⍺ 4 | Provanto.Run p.Tests p.Main 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetAcreConfig-89.aplf: -------------------------------------------------------------------------------- 1 | SetAcreConfig←{ 2 | ⍝ Sets up AcreConfig in each project space 3 | s f←↓⍉⎕SE.UCMD']acre.Projects' 4 | 0=≢s:0 5 | r←⍎¨s 6 | c←GetConfigSpace¨f 7 | r.AcreConfig←r.⎕NS c 8 | 0 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetAttributes-9.aplf: -------------------------------------------------------------------------------- 1 | SetAttributes←{ 2 | ⍝ ⍵ ←→ Dependency Space 3 | ⍵.IsPackage:0 4 | p←⍵.ProjectFolder 5 | s←p GetHistory'' 6 | b←s.(MostRecent∧Exists) 7 | n←b/s.APLItemName 8 | a←QuadAT n 9 | a[;1]←7↑¨b/s.CommitTS 10 | a[;3]←b/s.CommitBy 11 | _←a QuadAT n 12 | 0 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetConfigParam-209.aplf: -------------------------------------------------------------------------------- 1 | SetConfigParam←{ 2 | ⍝ ⍵ ←→ Name and value 3 | ⍝ ⍺ ←→ Project Space 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | n v←⍵ 7 | ct←p,'acre.config' 8 | c←ReadConfigFile ct 9 | _←n c.{⍎⍺,'←⍵'}v 10 | t←FormatConfigSpace c 11 | _←(⊂t)⎕NPUT ct 1 12 | 0 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetQuadLX-189.aplf: -------------------------------------------------------------------------------- 1 | SetQuadLX←{ 2 | n←'OnApplicationStartup' 3 | c←⍵.AcreConfig 4 | 0=c.⎕NC n:'' 5 | e←c⍎n 6 | 0=≢e:'' 7 | c._ProjectSpace,'.',e,' ',⍕⍵ 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetReference-9.aplf: -------------------------------------------------------------------------------- 1 | SetReference←{ 2 | ⍝ Inject 3 | ⍝ ⍺ ←→ Targets 4 | ⍝ ⍵ ←→ Name, value, type 5 | n v t←⍵ 6 | t=0:0 7 | r←⍺⊃⍨⍳|t-2 8 | s←(0=∊r.⎕NC⊂n)/r 9 | 0=≢s:0 10 | 0⊣⍎'s.',n,'←v' 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetReferences-9.aplf: -------------------------------------------------------------------------------- 1 | SetReferences←{ 2 | ⍝ ⍺ ←→ All project spaces 3 | ⍝ ⍵ ←→ Project Space 4 | ⍝ ⍵.AcreConfig.ProjectName≡'Dado':0 5 | p a t←⍺ GetInjectionInfo ⍵ 6 | 0=≢p:0 7 | e←GetAPISpace¨p 8 | r←{⍵/⍨9.1=⎕NC⍕¨⍵}refs ⍵ 9 | r∘SetReference¨↓⍉⊃a e t 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetupApplication-21.aplf: -------------------------------------------------------------------------------- 1 | SetupApplication←{ 2 | ⍝ ⍵ ←→ ProjectFolder, version 3 | ⍝ ← ←→ Primary Project Space 4 | pf v←⍵ 5 | c←⌽pf Retrieve v 6 | f←c.ProjectFolder 7 | _←c.⎕EX⊂'ProjectFolder' 8 | _←c.⎕FX⊂⎕NR'ProjectFolder' 9 | load←{⎕SE.UCMD']acre.OpenProject ',⍵,' ',⍺,' -track=off -dependencies=off'} 10 | s←⍎¨c._ProjectSpace load¨f 11 | s.AcreConfig←s.⎕NS c 12 | _←s∘SetReferences¨s 13 | ↑⌽s 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/SetupWorkspace-21.aplf: -------------------------------------------------------------------------------- 1 | SetupWorkspace←{ 2 | p←,⍵ 3 | f←p.AcreConfig.ProjectFolder 4 | c←GetConfigSpace¨f 5 | p.AcreConfig←p.⎕NS c 6 | _←CheckAPLVersion¨c 7 | _←p∘SetReferences¨p 8 | 0 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowBranches-11.aplf: -------------------------------------------------------------------------------- 1 | ShowBranches←{ 2 | ⍺←0 3 | p←GetProjectFolder ⍺ 4 | p≡'':'Not in project' 5 | ⊃p RunGitCommand'branch --list -a' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowChanges-11.aplf: -------------------------------------------------------------------------------- 1 | ShowChanges←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | b←p GetCurrentBranch'' 7 | n←↑⌽{(⍵≠'/')⊆⍵}p 8 | z←⊂'Project/Branch: ',n,'/',b 9 | z,←⊂'Uncommitted Changes:' 10 | r←p RunGitCommand'status --short' 11 | z,←↓⍕p FormatStatus r 12 | z,←⊂'Committed Changes:' 13 | r←p RunGitCommand'diff --name-status master...' 14 | ⍝ Rethink this↑↑↑, should check for nearest ancestor, not master 15 | ⍝ which may have advanced 16 | z,←↓⍕p FormatStatus r 17 | ⊃z 18 | } 19 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowCommitDetail-411.aplf: -------------------------------------------------------------------------------- 1 | ShowCommitDetail←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | w←↑1⊃⎕VFI(⍕⍵),' 1' 7 | n←(w>0)/'-',⍕w 8 | r←p RunGitCommand'log ',n,' --name-status' 9 | ⊃p∘ProcessFileLine¨r 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowCommitSummary-411.aplf: -------------------------------------------------------------------------------- 1 | ShowCommitSummary←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | w←↑1⊃⎕VFI(⍕⍵),' 10' 7 | n←(w>0)/'-',⍕w 8 | ⊃p RunGitCommand'log ',n,' --pretty=format:"%h %an, %ar, %s"' 9 | } 10 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowHistory-11.aplf: -------------------------------------------------------------------------------- 1 | ShowHistory←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | s←p GetHistory ⍵ 7 | c←↓⍕⍉⊃s.(CommitBy CommitDate Status CommitHash) 8 | l←80⍴'-' 9 | v←c{⍺ l,⍵,⊂''}¨s.Value 10 | v←↑,/v 11 | ⊃v 12 | } 13 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowProjects-11.aplf: -------------------------------------------------------------------------------- 1 | ShowProjects←{ 2 | r←⎕SE.UCMD']acre.Projects' 3 | n←r[;0] 4 | sn←{↑⌽('.'≠⍵)⊆⍵}¨n 5 | p←⍎¨n 6 | b←p GetCurrentBranch¨⊂'' 7 | uc←≢¨p RunGitCommand¨⊂'status --short' 8 | cc←≢¨p RunGitCommand¨⊂'diff --name-status master...' 9 | h←↓¨'Project' 'Branch' 'UC' 'CC',[¯0.5]¨'-' 10 | ⍉⊃h,¨sn b uc cc 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/ShowTags-11.aplf: -------------------------------------------------------------------------------- 1 | ShowTags←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | p≡'':'Not in project' 6 | ⊃p RunGitCommand'tag' 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/SourceCode-41.aplf: -------------------------------------------------------------------------------- 1 | SourceCode←{ 2 | ⎕CR ⍵ 3 | } 4 | -------------------------------------------------------------------------------- /APLSource/Main-1/SpaceToFolder-a1.aplf: -------------------------------------------------------------------------------- 1 | SpaceToFolder←{ 2 | ⍝ ⍺ ←→ Config Space 3 | ⍝ ⍵ ←→ Relative space ie. Main or Main.GUI 4 | c←{0::0 ⋄ ⍵.CaseCode≡'On'}⍺ 5 | f←⍺.ProjectFolder 6 | p←⍵⊆⍨'.'≠⍵ 7 | ~c:f,'APLSource',∊'/',¨p 8 | cc←ComputeCaseCode¨p 9 | f,'APLSource',∊p{'/',⍺,'-',⍵}cc 10 | } 11 | -------------------------------------------------------------------------------- /APLSource/Main-1/Squash-1.aplf: -------------------------------------------------------------------------------- 1 | Squash←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍝ ⍵ ←→ Commit Message 4 | ⍺←0 5 | p←GetProjectFolder ⍺ 6 | b←p GetCurrentBranch'' 7 | b≡'master':'No squashing the master.' 8 | p IsDirty'':'Uncommitted changes.' 9 | m←⍵,(0=≢⍵)/'Save point' 10 | ca←↑p RunGitCommand'merge-base master ',b 11 | ⎕←⊃p RunGitCommand'reset --soft ',ca 12 | ⎕←⊃p RunGitCommand'commit -m "',m,'"' 13 | 'Done' 14 | } 15 | -------------------------------------------------------------------------------- /APLSource/Main-1/StartApplication-21.aplf: -------------------------------------------------------------------------------- 1 | StartApplication←{ 2 | ⍝ ⍵ ←→ n/a 3 | f←↑⎕NPARTS ⎕WSID 4 | s←SetupApplication f 5 | s Execute'OnApplicationStartup' 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/Status-1.aplf: -------------------------------------------------------------------------------- 1 | Status←{ 2 | ⍝ ⍺ ←→ [Project Folder|Space] 3 | ⍺←0 4 | p←GetProjectFolder ⍺ 5 | r←p RunGitCommand'status --short' 6 | p FormatStatus r 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Main-1/ToLowerCase-85.aplf: -------------------------------------------------------------------------------- 1 | ToLowerCase←{('.+'⎕R'\l0')⍵} 2 | -------------------------------------------------------------------------------- /APLSource/Main-1/UnscriptableFunctions-1001.aplf: -------------------------------------------------------------------------------- 1 | UnscriptableFunctions←{ 2 | o←refs ⍵ ⍝ Find all objects 3 | s←(9.1=⎕NC⍕¨o)/o ⍝ Remove unnamed namespaces and classes 4 | r←({16::1 ⋄ 0⊣⎕SRC ⍵}¨s)/s ⍝ Remove scripted namespaces 5 | f←r.⎕NL⊂-3 4 ⍝ All funs/ops 6 | f r←(0≠≢¨f)∘/¨f r ⍝ Remove empties 7 | n←↑,/((⍕¨r),¨'.'){⍺∘,¨⍵}¨f ⍝ All FQP names 8 | q←{(⊂'∇',↑⍵),(1↓⍵),⊂,'∇'} ⍝ 9 | t←(⎕NC n)∊3.1 4.1 ⍝ Trad 10 | en em←↓⍉⊃t{ 11 | p←⊂':Namespace' 12 | p,←(q⍣⍺)⎕NR ⍵ 13 | p,←⊂':EndNamespace' 14 | 0::⎕DMX.EN ⎕DMX.Message 15 | (0⊣1 ⎕FIX p)'' 16 | }¨n 17 | (en≠0)⌿⍉⊃n en em 18 | } 19 | -------------------------------------------------------------------------------- /APLSource/Main-1/Version-1.aplf: -------------------------------------------------------------------------------- 1 | Version←{ 2 | (GetProjectSpace ⎕THIS).AcreConfig.Version 3 | } 4 | -------------------------------------------------------------------------------- /APLSource/Main-1/WriteGitAttributes-121.aplf: -------------------------------------------------------------------------------- 1 | WriteGitAttributes←{ 2 | ⍺←0 3 | p←GetProjectFolder ⍺ 4 | f←p,'.gitattributes' 5 | t←'*.apl? linguist-language=APL' 6 | _←(⊂t)⎕NPUT f 1 7 | 0 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/WriteGitIgnore-121.aplf: -------------------------------------------------------------------------------- 1 | WriteGitIgnore←{ 2 | ⍺←0 3 | p←GetProjectFolder ⍺ 4 | f←p,'.gitignore' 5 | t←'aplcore' '.acre/' 'dist/' 'Assets/Runtime/LocallyDerived/' 6 | _←(⊂t)⎕NPUT f 1 7 | 0 8 | } 9 | -------------------------------------------------------------------------------- /APLSource/Main-1/Zip-1.aplf: -------------------------------------------------------------------------------- 1 | Zip←{ 2 | ⍝ ⍵ ← Source Folder, Target Zip File [CompressionLevel [InlcludeBaseDirectory]] 3 | ⍝ CompresssionLevel is 0 for optimal, 1 for fastest, 2 for none. 4 | _net←⎕NS'' 5 | _net.⎕USING←{ 6 | u←'System.IO.Compression,System.IO.Compression.' 7 | u,⍵⊃'FileSystem.dll' 'ZipFile' 8 | }IsNetCore'' 9 | 6::0 10 | 0{⍺}_net.ZipFile.CreateFromDirectory ⍵ 11 | } 12 | -------------------------------------------------------------------------------- /APLSource/Main-1/box-0.aplf: -------------------------------------------------------------------------------- 1 | box←{ 2 | h b f←⎕FMT¨⊃¨⍵ 3 | mw←⌈/{↑⌽⍴⍵}¨h b f 4 | h b f←mw(↑⍤1)¨h b f 5 | r c←⍴b 6 | e←1 c 1 7 | tl tr bl br vt hz le re←'┌┐└┘│─├┤' 8 | top←e/tl hz tr 9 | mid←e/le hz re 10 | bot←e/bl hz br 11 | h b f←{vt,⍵,vt}¨h b f 12 | ⊃⍪/top h mid b mid f bot 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/Main-1/dlb-0.aplf: -------------------------------------------------------------------------------- 1 | dlb←{(∨\' '≠⍵)/⍵} 2 | -------------------------------------------------------------------------------- /APLSource/Main-1/nget-0.aplf: -------------------------------------------------------------------------------- 1 | nget←{ 2 | ⍝ ⍵ ←→ File Name 3 | ⍝ ← ←→ v/v 4 | ~⎕NEXISTS ⍵:'' 5 | ↑⎕NGET ⍵ 1 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/nput-0.aplf: -------------------------------------------------------------------------------- 1 | nput←{ 2 | ⍝ ⍺←v/v 3 | ⍝ ⍵←File name 4 | (⊂⍺)⎕NPUT ⍵ 1 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Main-1/nputJSON-f0.aplf: -------------------------------------------------------------------------------- 1 | nputJSON←{ 2 | t←{⍵⊆⍨⍵≠⎕UCS 13}1(⎕JSON⍠'Compact' 0)⍺ 3 | (⊂t)⎕NPUT ⍵ 1 4 | } 5 | -------------------------------------------------------------------------------- /APLSource/Main-1/popspace-0.aplf: -------------------------------------------------------------------------------- 1 | popspace←{ 2 | ⍺←⎕NS'' 3 | n v←⍵ 4 | 0=≢n:⍺ 5 | ⍺⊣n ⍺.{⍎⍺,'←⍵'}¨v 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/Main-1/refs-0.aplf: -------------------------------------------------------------------------------- 1 | refs←{ ⍝ Vector of sub-space references for ⍵. 2 | ⍺←⍬ ⋄ (≢⍺)↓⍺{ ⍝ default exclusion list. 3 | ⍵∊⍺:⍺ ⍝ already been here: quit. 4 | ⍵.(↑∇∘⍎⍨/⌽(⊂⍺∪⍵),↓⎕NL 9) ⍝ recursively traverse any sub-spaces. 5 | }⍵ ⍝ for given starting ref. 6 | } 7 | -------------------------------------------------------------------------------- /APLSource/QuadLX-31.aplf: -------------------------------------------------------------------------------- 1 | QuadLX←{ 2 | t←⊂,'┌─────────────────────────────────────────────────────────────┐' 3 | t,←⊂'│ │' 4 | t,←⊂'│ APL Dado │' 5 | t,←⊂'│ \¯¯¯¯¯/ Dyalog APL Development Operations │' 6 | t,←⊂'│ | | ---- │' 7 | t,←⊂'│ | | https://github.com/the-carlisle-group/Dado │' 8 | t,←⊂'│ /_____\ ---- │' 9 | t,←⊂'│ |_____| "Put your apps on a solid foundation" │' 10 | t,←⊂'│ │' 11 | t,←⊂'└─────────────────────────────────────────────────────────────┘' 12 | ⊃t 13 | } 14 | -------------------------------------------------------------------------------- /APLSource/QuadVariables-11.apln: -------------------------------------------------------------------------------- 1 | :Namespace QuadVariables 2 | ##.(⎕IO ⎕ML)←0 3 3 | :EndNamespace 4 | 5 | -------------------------------------------------------------------------------- /APLSource/Tests-1/DeleteTempFolder-441.aplf: -------------------------------------------------------------------------------- 1 | DeleteTempFolder←{ 2 | f←GetTempFolder'' 3 | q←'"',f,'*.*"' 4 | _←⎕CMD'attrib -s -h -r ',q,' /s /d' 5 | _←3 ⎕NDELETE f 6 | f 7 | } 8 | -------------------------------------------------------------------------------- /APLSource/Tests-1/GetTempFolder-89.aplf: -------------------------------------------------------------------------------- 1 | GetTempFolder←{ 2 | ##.AcreConfig.ProjectFolder,'dist/temp/' 3 | } 4 | -------------------------------------------------------------------------------- /APLSource/Tests-1/Reset-1.aplf: -------------------------------------------------------------------------------- 1 | Reset←{ 2 | f←DeleteTempFolder'' 3 | _←⎕EX'#.TestProjects' 4 | f 5 | } 6 | -------------------------------------------------------------------------------- /APLSource/Tests-1/TestBuildNSS-e11.aplf: -------------------------------------------------------------------------------- 1 | TestBuildNSS←{ 2 | A←##.Main 3 | ⍝ Construct a script 4 | s←⊂':Namespace' 5 | 6 | ⍝s,←⊂':Namespace MoreCode' 7 | ⍝ s,←⊂'∇Z←Double X' 8 | ⍝ s,←⊂':Access Public Shared' 9 | ⍝ s,←⊂'Z←X×2' 10 | ⍝ s,←⊂'∇' 11 | ⍝ s,←⊂':EndNamespace' 12 | ⍝ 13 | s,←⊂':Class MyClass' 14 | s,←⊂':Include MoreCode' 15 | s,←⊂'∇Z←Triple X' 16 | s,←⊂':Access Public Shared' 17 | s,←⊂'Z←X×3' 18 | s,←⊂'∇' 19 | s,←⊂':EndClass' 20 | 21 | s,←⊂':Namespace MoreCode' 22 | s,←⊂'∇Z←Double X' 23 | s,←⊂':Access Public Shared' 24 | s,←⊂'Z←X×2' 25 | s,←⊂'∇' 26 | s,←⊂':EndNamespace' 27 | 28 | 29 | 30 | s,←⊂':EndNamespace' 31 | r←⎕FIX s 32 | 12≠r.MyClass.Triple 4:1 33 | 8≠r.MoreCode.Double 4:1 34 | 8≠r.MyClass.Double 4:1 35 | 0 36 | 37 | } 38 | -------------------------------------------------------------------------------- /APLSource/Tests-1/TestCircularDependencies-1011.aplf: -------------------------------------------------------------------------------- 1 | TestCircularDependencies←{ 2 | ⍝ Dado API 3 | A←##.Main 4 | ⍝ Clean up and initialize 5 | tf←Reset 0 6 | ⍝ Create Project C, with dependency on Project A 7 | c←⍎'#.TestProjects.ProjectC'⎕NS'' 8 | _←c.⎕FX'SumInC←{' '+/⍵' '}' 9 | _←A.CreateProject tf,'ProjectC #.TestProjects.ProjectC' 10 | _←c A.SetConfigParam'URL' 'Tests/ProjectC' 11 | _←c A.AddDependency'Tests/ProjectA' '0.0.0' 'ThisIsA' 1 12 | _←c A.Commit'Add config parameters' 13 | _←c A.CreateNewVersion'' 14 | ⍝ Create Project B, with dependency on A and C 15 | b←⍎'#.TestProjects.ProjectB'⎕NS'' 16 | _←b.⎕FX'MaxInB←{' '⌈/⍵' '}' 17 | _←A.CreateProject tf,'ProjectB #.TestProjects.ProjectB' 18 | _←b A.SetConfigParam'URL' 'Tests/ProjectB' 19 | _←b A.AddDependency'Tests/ProjectA' '0.0.0' 'ProjA' 1 20 | _←b A.AddDependency'Tests/ProjectC' '0.0.0' 'ProjC' 1 21 | _←b A.Commit'Add config parameters' 22 | _←b A.CreateNewVersion'' 23 | ⍝ Create Project A, with B as dependency 24 | a←⍎'#.TestProjects.ProjectA'⎕NS'' 25 | _←a.⎕FX'ProductInA←{' '×/⍵' '}' 26 | _←A.CreateProject tf,'ProjectA #.TestProjects.ProjectA' 27 | _←a A.SetConfigParam'URL' 'Tests/ProjectA' 28 | _←a A.AddDependency'Tests/ProjectB' '0.0.0' 'ThisIsB' 1 29 | _←a A.Commit'Add config parameters' 30 | _←a A.CreateNewVersion'' 31 | ⍝ Build Project A 32 | _←a A.Build'0.0.0' 33 | ⍝ Open Application A 34 | s←⎕NS'' 35 | _←s.⎕CY a.AcreConfig.DistFolder,'Application/ProjectA/ProjectA.dws' 36 | s←s.TestProjects 37 | ⍝ Test Structure 38 | 9≠s.ProjectA.ThisIsB.MaxInB 6 9 2:1 39 | 24≠s.ProjectB.ProjA.ProductInA 2 3 4:1 40 | 10≠s.ProjectB.ProjC.SumInC 1 2 3 4:1 41 | 20≠s.ProjectC.ThisIsA.ProductInA 4 5:1 42 | ⍝ Good! 43 | 0⊣Reset 0 44 | } 45 | -------------------------------------------------------------------------------- /APLSource/Tests-1/TestDependencies-11.aplf: -------------------------------------------------------------------------------- 1 | TestDependencies←{ 2 | ⍝ Dado API 3 | A←##.Main 4 | ⍝ Clean up and initialize 5 | tf←Reset 0 6 | ⍝ Create Project U, with a couple of versions 7 | u←⍎'#.TestProjects.ProjectU'⎕NS'' 8 | _←u.⎕FX¨,¨⊂¨'sum←{⌊/⍵}' 'product←{×/⍵}' ⍝ N.B. Bug in sum function 9 | _←A.CreateProject tf,'ProjectU #.TestProjects.ProjectU' 10 | _←u A.SetConfigParam'URL' 'Tests/ProjectU' 11 | _←u A.SetConfigParam'ProjectSpace' '*' 12 | _←u A.Commit'Add config parameters' 13 | _←u A.CreateNewVersion'' 14 | _←u.⎕FX,⊂'sum←{+/⍵}' 15 | _←⎕SE.acre.SetChanged'#.TestProjects.ProjectU.sum' 16 | _←u A.Commit'Fix bug in sum function' 17 | _←u A.CreateNewVersion'' 18 | 19 | ⍝ Create Project D, with dependency on Project U v0.0.0 20 | d←⍎'#.TestProjects.ProjectD'⎕NS'' 21 | _←d.⎕FX'average←{' '(U.sum ⍵)÷≢⍵' '}' 22 | _←A.CreateProject tf,'ProjectD #.TestProjects.ProjectD' 23 | _←d A.SetConfigParam'URL' 'Tests/ProjectD' 24 | _←d A.AddDependency'Tests/ProjectU' '0.0.0' 'U' 1 25 | _←d A.Commit'Add config parameters' 26 | _←d A.CreateNewVersion'' 27 | 28 | ⍝ Create Project C, with dependency on Project U v0.0.1 29 | c←⍎'#.TestProjects.ProjectC'⎕NS'' 30 | _←c.⎕FX'average←{' '(ProjectU.sum ⍵)÷≢⍵' '}' 31 | _←A.CreateProject tf,'ProjectC #.TestProjects.ProjectC' 32 | _←c A.SetConfigParam'URL' 'Tests/ProjectC' 33 | _←c A.AddDependency'Tests/ProjectU' '0.0.1' '' 1 34 | _←c A.Commit'Add config parameters' 35 | _←c A.CreateNewVersion'' 36 | 37 | ⍝ Create Project B, with dependency on C and D 38 | b←⍎'#.TestProjects.ProjectB'⎕NS'' 39 | _←b.⎕FX'compareAverages←{' '(C.average ⍵) (D.average ⍵)' '}' 40 | _←A.CreateProject tf,'ProjectB #.TestProjects.ProjectB' 41 | _←b A.SetConfigParam'URL' 'Tests/ProjectB' 42 | _←b A.AddDependency'Tests/ProjectC' '0.0.0' 'C' 1 43 | _←b A.AddDependency'Tests/ProjectD' '0.0.0' 'D' 1 44 | _←b A.Commit'Add config parameters' 45 | _←b A.CreateNewVersion'' 46 | 47 | ⍝ Create Project A, with B as dependency 48 | a←⍎'#.TestProjects.ProjectA'⎕NS'' 49 | _←a.⎕FX'fooA←{' 'B.compareAverages ⍵' '}' 50 | _←A.CreateProject tf,'ProjectA #.TestProjects.ProjectA' 51 | _←a A.SetConfigParam'URL' 'Tests/ProjectA' 52 | _←a A.AddDependency'Tests/ProjectB' '0.0.0' 'B' 2 53 | _←a A.Commit'Add config parameters' 54 | _←a A.CreateNewVersion'' 55 | 56 | ⍝ Build Project A 57 | _←a A.Build'0.0.0' 58 | 59 | ⍝ Open Application A 60 | s←⎕NS'' 61 | _←s.⎕CY a.AcreConfig.DistFolder,'Application/ProjectA/ProjectA.dws' 62 | 63 | ⍝ Verify the structure 64 | r←s.TestProjects.ProjectA.fooA 1 2 3 4 5 65 | r≢3 0.2:1 66 | 67 | ⍝ Verify references not injected into 68 | 0≠s.TestProjects.ProjectA.AcreConfig.⎕NC'B':1 69 | 70 | ⍝ Good! 71 | 0⊣Reset 0 72 | } 73 | -------------------------------------------------------------------------------- /APLSource/UCMD-f/Help-1.aplf: -------------------------------------------------------------------------------- 1 | Help←{ 2 | 'No help available at this time' 3 | } 4 | -------------------------------------------------------------------------------- /APLSource/UCMD-f/List-1.aplf: -------------------------------------------------------------------------------- 1 | z←List 2 | z←{ 3 | f←##.Main.APIFunctionNames'' 4 | z←{⎕NS''}¨⍳≢f 5 | z.Name←f 6 | z.Desc←f 7 | z.Group←⊂'dado' 8 | z.Parse←⊂'' 9 | z 10 | }0 11 | -------------------------------------------------------------------------------- /APLSource/UCMD-f/Run-1.aplf: -------------------------------------------------------------------------------- 1 | Run←{ 2 | c a←⍵ 3 | q←''''∧.=2↑¯1⌽a 4 | (##.Main⍎c)(-q)↓q↓a 5 | } 6 | -------------------------------------------------------------------------------- /Assets/Runtime/acre.dws: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/the-carlisle-group/Dado/e0004ae7f062a612092ca8b955deb4caf7b5c52d/Assets/Runtime/acre.dws -------------------------------------------------------------------------------- /Assets/Runtime/acre.dyalog: -------------------------------------------------------------------------------- 1 | :namespace acreInit 2 | ⎕io ⎕ml←0 3 | name ← ,'acre' ⍝ string 4 | group ← ,¨ 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' 'acre' ⍝ list 5 | cmds ← ,¨ 'AfterSave' 'CaseCode' 'Changefile' 'Changes' 'CloseProject' 'CreateProject' 'Deletefile' 'EditArray' 'Erase' 'FromAPLAN' 'Itemname' 'Log' 'Nameclass' 'OpenProject' 'Projects' 'PurgeHistory' 'Redo' 'Refresh' 'Removeacre' 'Restore' 'SetChanged' 'Sourcefile' 'Stats' 'ToAPLAN' 'Undo' 'Version' ⍝ list 6 | help ← ,¨ 'Specify or query callback to run after saving to file' 'Toggle between names with and without case-codes' 'Putative changefile name(s) of item(s) in tracked project' 'List changed items in project or changes to one' 'Close (stop tracking) a tracked project' 'Create a new project' 'Putative deletefile name(s) of item(s) in tracked project' 'Edit any named array. In APLAN if not regular text.' 'Erase an item, items or a space from a tracked project' 'Evaluate an APLAN expression' 'Full or relative ns path of item in putative sourcefile' 'Hide, show, clear or query the log' 'Nameclass of item(s)' 'Load project code into ws for development' 'List spaces & folders of all tracked projects.' 'Fix changes to a tracked project' 'Re-apply last undone change.' 'Update tracked project with source changes since previous' 'Close all tracked projects and remove the ⎕SE.acre namespace resetting ⎕SE as found' 'Bring back items ]erased' 'Write items as if changed in the editor' 'Putative sourcefile name(s) of item(s) in tracked project' 'Project Statistics' 'Format a value as APLAN' 'Revert to previous version' 'Version of acre in use' ⍝ list 7 | type ← ,¨ 'shared' 'shared' 'item' 'item' 'project' 'shared' 'item' 'shared' 'item' 'shared' 'shared' 'shared' 'shared' 'shared' 'shared' 'item' 'item' 'project' 'shared' 'item' 'item' 'item' 'project' 'shared' 'item' 'shared' ⍝ list 8 | syn ← ,¨ ']acre.AfterSave #.function.name | '''' ' ']acre.CaseCode item(s) ' ']acre.Changefile item(s) ' ']acre.Changes space | item -when[=]' ']acre.CloseProject space -all' ']acre.CreateProject folder space -casecode:off -keephistory:off -variables:off' ']acre.Deletefile item(s) ' ']acre.EditArray item ' ']acre.Erase item(s) | space -recursive' ']acre.FromAPLAN name | "expression" ' ']acre.Itemname sourcefile(s) ' ']acre.Log hide | show | file | clear | all | find "string" | number ' ']acre.Nameclass item(s) ' ']acre.OpenProject folder [space] -dependencies:on -track:on' ']acre.Projects -when[=]' ']acre.PurgeHistory space | item ' ']acre.Redo item(s) ' ']acre.Refresh space -all' ']acre.Removeacre ' ']acre.Restore item ' ']acre.SetChanged item(s) | space -recursive' ']acre.Sourcefile item(s) ' ']acre.Stats space -all' ']acre.ToAPLAN name | "expression" ' ']acre.Undo item(s) ' ']acre.Version ' ⍝ list 9 | parse ← ,¨ '999S' '999S' '999S' '999S -when[=]' '999S -all' '999S -casecode:off -keephistory:off -variables:off' '999S' '999S' '999S -recursive' '999S' '999S' '999S' '999S' '999S -dependencies:on -track:on' '999S -when[=]' '999S' '999S' '999S -all' '999S' '999S' '999S -recursive' '999S' '999S -all' '999S' '999S' '999S' ⍝ list 10 | ∇ r←List 11 | r←{⎕NS''}¨⍳⍴cmds 12 | r.(Name Desc Group Parse)←↓⍉↑cmds help group parse 13 | ∇ 14 | Help←{r←'' 'Syntax: ',¨help syn⊃¨⍨cmds⍳⊂⍵ 15 | 0≥⎕SE.⎕NC name:⍕⍪r 16 | ⍕⍪r,⊂⎕SE.acre._code.(MS.HA,Cc ⍵) 17 | } 18 | Run←{cmd arg←⍵ 19 | (path wsid)←,\{⍵(↑{⍺⍵}↓)⍨(1+⊢⍳⌈/)+\⍵∊'\/'}##.SourceFile 20 | new←{⎕se.acre._code. newSession''}⍣(~new)⊢new←0∊⎕SE.⎕NC name 21 | z←⎕SE.{6::0 ⋄ ⊢'#.acre'∘⎕CY ⍵}⍣new⊢wsid 22 | nsi←((⎕XSI+.=¨'.')⍳1)⊃⎕NSI ⍝ whence called 23 | type←type⊃⍨cmds⍳⊂cmd 24 | ⍝ ↓↓↓↓ 25 | ⎕SE.acre._code. userCmdRun new cmd arg type nsi path wsid name 26 | } 27 | :endnamespace 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Paul Mansour 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | >**He too spoke well - whoever it was, for his identity is uncertain - who said, when asked why he took so much trouble 3 | over a piece of craftsmanship that would never reach more than a very few people: "A few is enough for me; so is one; so is none."** 4 | 5 | Seneca, *Epistles 7.11* 6 | 7 | >**No man but a blockhead ever wrote code except for money.** 8 | 9 | Samuel Johnson 10 | 11 | # Dado 12 | Dado is a collection of User Commands that implements a framework for Dyalog APL development operations. See the wiki for how to install and use Dado in your Dyalog APL session as a user (as an APL developer). 13 | 14 | These notes are for working and developing Dado itself. 15 | 16 | ## Bootstrapping 17 | Dado functions can be called directly from the Dado project space when working on Dado itself. 18 | This is useful for testing new functionality and debugging. You can also use a properly installed version of Dado when working on Dado. Thus when working on Dado, you can decide whether to use the current state of things or the installed state. 19 | 20 | You can call `#.Dado.BootStrapBuild 0` to install the current state of the project as a User Command. 21 | This function creates a new application folder (`dist/Application`) but does not create a new release, or push or publish anything. 22 | The application folder is then automatically copied over to the location of the user command. Restart APL to see the effects. Note 23 | that if you do not see the effects as expected, you may have saved your session with a stale copy of Dado. If this is the case, 24 | delete the copy of Dado in the session, save the session, and restart APL. 25 | -------------------------------------------------------------------------------- /ReleaseNotes.md: -------------------------------------------------------------------------------- 1 | # Dado Release 0.0.91 2 | 1. Handle empty WSID for DLL apps 3 | 2. Update Provanto 4 | 3. Cleanup 5 | 4. Delete obsolete functions 6 | 5. Utilize DadoProjectsFolder in CreateProject (#108) 7 | 6. Add BuildNamespace parameter and associated functionality 8 | 7. Add Provanto testing 9 | 10 | # Dado Release 0.0.90 2023-01-20 13:25:40 11 | 1. Bump Acre version to 8.3.1+342 12 | 13 | # Dado Release 0.0.89 2023-01-17 10:40:54 14 | 1. Fix issue #109 (Pushing tags) 15 | 16 | # Dado Release 0.0.88 2022-03-29 10:37:48 17 | 18 | # Dado Release 0.0.87 2022-03-29 10:37:29 19 | 1. Relocate ⎕JSON to #.⎕JSON to emulate old behavior in ReadConfigFile 20 | 21 | # Dado Release 0.0.86 2022-03-29 09:51:11 22 | 23 | # Dado Release 0.0.85 2022-03-29 09:45:00 24 | 1. Revert BuildWorkspace_ 25 | 2. Fix to last commit, instantiated ProjectFolder function in wrong place 26 | 3. Workaround for ⎕SAVE problem 27 | 4. Build failure notification improvements (#107) 28 | 5. Fix for GetCommandLineArgs dropping double quots on paths. (#106) 29 | 6. Change HTTPCommand timeout to 600 seconds. (#103) 30 | 7. Enhance ExecuteAPL to use existing command line parameters 31 | 8. Handle limit error in getting and setting QuadAT 32 | 9. Add support for configuration parameter DadoProjectsFolder 33 | 10. Set quadAT attributes on opening project 34 | 35 | # Dado Release 0.0.84 2022-01-18 10:21:23 36 | 37 | # Dado Release 0.0.83 2022-01-18 09:15:15 38 | 39 | # Dado Release 0.0.82 2022-01-12 22:40:29 40 | 1. Fix uploading large files and files with blanks 41 | 2. Make Zip .NET Core Compatible (#101) 42 | 3. Update README.md 43 | 44 | # Dado Release 0.0.81 2022-01-06 18:01:15 45 | 1. Remove OctoKit with native GitHub API calls (#100) 46 | 2. Fix issue #90 47 | 48 | # Dado Release 0.0.80 2022-01-06 15:24:56 49 | 1. Feature/GitHub pat support (#98) 50 | 2. OpenProject error when leading spaces present in the path (#97) 51 | 3. Minor changes (#95) 52 | 53 | # Dado Release 0.0.77 2022-01-05 11:47:36 54 | 1. Add default OnSave to config file 55 | 2. Add OnSave config parameter 56 | 3. Create gitattributes file (Issue #88) (#92) 57 | 4. Accommodate SSH URLs (#89) 58 | 5. Intitial effort at distributing code in namespace scripts 59 | 6. Add .github folder to omit list in CopyProject (Issue #71) 60 | 7. Add project-to-scripted namespace functionality 61 | 62 | # Dado Release 0.0.76 2020-07-01 16:54:15 63 | 1. Add DyalogProjectsFolder to config file 64 | 2. Split session output on Build into multiple lines (Issue #69) 65 | 3. Provide proper error message on Build when not in project (Issue #66) 66 | 4. Build workspaces using targeted Dyalog version 67 | 68 | # Dado Release 0.0.75 2020-06-29 12:04:27 69 | 1. Quote paths when retrieving dependencies (Issue #67) 70 | 2. Modify ReleaseOnGithub 71 | 72 | # Dado Release 0.0.74 2020-06-26 13:55:28 73 | 74 | # Dado Release 0.0.73 2020-06-26 13:40:23 75 | 76 | # Dado Release 0.0.72 2020-06-26 13:15:14 77 | 1. Fix up BootStrapBuild 78 | 2. WIP 79 | 3. Move dist folder to op sys temp folder (Issue #65) 80 | 4. Fix build ID message (Issue #61) 81 | 5. Remove Dyalog system file (Issue #59) 82 | 83 | # Dado Release 0.0.71 2020-06-25 12:27:46 84 | 1. Fix DownloadProject to handle spaces in path (Issue #57)' 85 | 2. Restructure BuildID JSON (Issue #58) 86 | 3. Update README.md 87 | 4. Update bootstrap function 88 | 5. Add Dyalog system files 89 | 6. Enhance ExecuteAPL to handle multi-line session input 90 | 91 | # Dado Release 0.0.70 2020-06-13 08:02:11 92 | 1. Update to Acre 8.2.0+323 93 | 2. Add development dependency parameter (Issue #33) 94 | 3. Diplay current branch in session on OpenProject 95 | 4. Enhance ExecuteAPL function (Issue #50) 96 | 5. Address issue #54 97 | 98 | # Dado Release 0.0.69 2020-06-05 08:04:52 99 | 1. Fix issue #53 100 | 101 | # Dado Release 0.0.68 2020-06-02 16:17:22 102 | 1. Add About command 103 | 104 | # Dado Release 0.0.67 2020-06-02 16:01:42 105 | 1. Fix OnRelease feature 106 | 107 | # Dado Release 0.0.66 2020-06-02 15:50:26 108 | 109 | # Dado Release 0.0.65 2020-06-02 15:46:52 110 | 1. Add OnRelease callback 111 | 2. Update README.md 112 | 113 | # Dado Release 0.0.64 2020-05-29 15:53:19 114 | 1. Rename project from AcreTools to Dado 115 | 2. Update README.md 116 | 3. Update README.md 117 | 4. Update README.md 118 | 119 | # Dado Release 0.0.63 2020-05-13 08:33:33 120 | 1. Add DependencyReport function to user commands and API 121 | 2. Update to Acre 1.8.0+318 122 | 123 | # Dado Release 0.0.62 2020-05-13 08:05:58 124 | 1. Add new command DependencyReport 125 | 126 | # Dado Release 0.0.61 2020-03-23 13:02:09 127 | 1. Add BuildID to build process 128 | 2. Update README.md 129 | 3. Fix Issue #41 130 | 131 | # Dado Release 0.0.60 2020-01-15 10:32:34 132 | 1. Fix issues #38 and #40 133 | 134 | # Dado Release 0.0.59 2020-01-14 16:05:52 135 | 1. handle config files without Version 136 | 137 | # Dado Release 0.0.58 2020-01-14 15:54:39 138 | 1. Handle config files without URLs 139 | 140 | # Dado Release 0.0.57 2020-01-14 12:13:38 141 | 142 | # Dado Release 0.0.56 2020-01-14 12:12:19 143 | 144 | # Dado Release 0.0.55 2020-01-14 12:09:59 145 | 146 | # Dado Release 0.0.54 2020-01-14 12:02:55 147 | 1. Fix IsPackage 148 | 149 | # Dado Release 0.0.53 2020-01-14 10:56:32 150 | 1. Update Acre to 7.0.0 151 | 152 | # Dado Release 0.0.52 2020-01-14 10:45:52 153 | 1. Prevent reference injection in unnamed namespaces 154 | 155 | # Dado Release 0.0.51 2020-01-12 08:03:34 156 | 1. Rename package cache folder 157 | 2. Quote paths for embedded spaces 158 | 3. Update README.md 159 | 160 | # Dado Release 0.0.50 2020-01-10 14:40:32 161 | 1. Refactor ReleaseNewVersion, adding CreateNewVersion 162 | 163 | # Dado Release 0.0.49 2020-01-10 10:18:46 164 | 1. Relocate package cache folder 165 | 166 | # Dado Release 0.0.48 2020-01-09 11:55:47 167 | 168 | # Dado Release 0.0.47 2020-01-09 11:48:48 169 | 170 | # Dado Release 0.0.46 2020-01-09 11:24:39 171 | 172 | # Dado Release 0.0.45 2020-01-09 11:21:54 173 | 174 | # Dado Release 0.0.44 2020-01-09 11:18:42 175 | 1. Add tests for dependencies 176 | 2. Handle circular dependencies 177 | 178 | # Dado Release 0.0.43 2020-01-04 14:32:20 179 | 180 | # Dado Release 0.0.42 2019-12-27 20:25:03 181 | 1. Rename AddToGitHub to AddRemote 182 | 2. Turn of status window when executing APL remotely 183 | 184 | # Dado Release 0.0.41 2019-10-15 10:57:01 185 | 186 | # Dado Release 0.0.40 2019-10-15 10:55:33 187 | 1. Move unused assets to RandD folder 188 | 2. remove obsolete stub workspace files 189 | 3. Inlcude package in release artifacts 190 | 4. Delete obsolete functions 191 | 5. Revamp build process 192 | 6. Redesign build process 193 | 7. Changes 194 | 8. Remove obsolete functions 195 | 9. Numerous changes 196 | 197 | # Dado Release 0.0.39 2019-09-10 09:01:04 198 | 1. Implement package management 199 | 2. Changes far too numerous to even consider 200 | 3. Even more changes 201 | 4. Many more changes 202 | 5. More changes 203 | 204 | # Dado Release 0.0.38 2019-09-03 13:38:07 205 | 1. Changes too numerous to list 206 | 2. Too many changes to mention 207 | 3. Fix Issue #21 208 | 4. Guard all commands when not in project (Issue #17) 209 | 5. Do not overwrite existing names when injecting references (Issue @22) 210 | 6. Double quote workspace path when calling stub ws (Issue #23) 211 | 7. Add automatic dependency detection and download 212 | 213 | # Dado Release 0.0.37 2019-08-24 12:08:35 214 | 1. Update to acre 6.0 215 | 216 | # Dado Release 0.0.36 2019-08-24 10:50:53 217 | 1. Change csv separator for git commit report 218 | 219 | # Dado Release 0.0.35 2019-08-24 08:58:30 220 | 1. Fix Issue #11 and Issue #12 221 | 2. Support JSON and APLAN in config files (Issue #9) 222 | 223 | # Dado Release 0.0.34 2019-08-21 13:46:29 224 | 1. Make UCMD list function more dynamic 225 | 2. Add folder to Git ignore file (Issue #8) 226 | 227 | # Dado Release 0.0.33 2019-08-18 14:09:13 228 | 1. Add AliasType parameter 229 | 230 | # Dado Release 0.0.32 2019-08-15 11:32:10 231 | 1. Revamp install yet again 232 | 233 | # Dado Release 0.0.31 2019-08-14 15:52:50 234 | 235 | # Dado Release 0.0.30 2019-08-14 15:36:45 236 | 237 | # Dado Release 0.0.29 2019-08-14 15:22:42 238 | 239 | # Dado Release 0.0.28 2019-08-14 15:07:12 240 | 1. Define references for cross-project calls 241 | 242 | # Dado Release 0.0.27 2019-08-09 16:29:56 243 | 244 | # Dado Release 0.0.26 2019-08-09 16:28:24 245 | 246 | # Dado Release 0.0.25 2019-08-09 16:13:37 247 | 1. Add API to QuadSE 248 | 249 | # Dado Release 0.0.24 2019-08-09 09:10:52 250 | 1. Revamp installation 251 | 252 | # Dado Release 0.0.23 2019-08-07 16:39:45 253 | 1. Initial UCMD replacement 254 | 2. Update README.md 255 | 3. Update README.md 256 | 4. Update README.md 257 | 258 | # Dado Release 0.0.22 2019-08-05 13:29:29 259 | 260 | # Dado Release 0.0.21 2019-08-05 13:27:58 261 | 262 | # Dado Release 0.0.20 2019-08-05 12:53:32 263 | 264 | # Dado Release 0.0.19 2019-08-05 12:40:09 265 | 266 | # Dado Release 0.0.18 2019-08-05 12:37:56 267 | 268 | # Dado Release 0.0.17 2019-08-05 12:33:11 269 | 1. Update README.md 270 | 2. Update README.md 271 | 272 | # Dado Release 0.0.16 2019-08-05 11:52:08 273 | 274 | # Dado Release 0.0.15 2019-08-05 11:40:27 275 | 1. Add startup session functionality 276 | 277 | # Dado Release 0.0.14 2019-08-01 16:35:06 278 | 1. Add PushMaster command 279 | 280 | # Dado Release 0.0.13 2019-08-01 16:23:03 281 | 282 | # Dado Release 0.0.13 2019-08-01 14:58:29 283 | 1. Modify CopyUserCommandFile to reflect new file name 284 | 2. Rename UCMD.dyalog to UCMD.txt so NOT found by User Command framework 285 | 3. Move UCMD.dyalog file to Runtime Assets folder 286 | 4. Redesign how application ws is created (Issue #10) 287 | 288 | # Dado Release 0.0.12 2019-07-31 09:59:25 289 | 1. Only include ucmd.dyalog if user command app (Issue #6) 290 | 291 | # Dado Release 0.0.11 2019-07-31 08:59:28 292 | 1. Rename CheckOut command to Checkout 293 | 2. Rename ShowCommit family of commands 294 | 295 | # Dado Release 0.0.10 2019-07-28 11:26:37 296 | 1. Extract Build function from ReleaseNewVersion 297 | 2. Add command SourceCode to display source 298 | 299 | # Dado Release 0.0.9 2019-07-27 15:56:29 300 | 1. Revamp User Command installation 301 | 2. Update README.md 302 | 303 | # Dado Release 0.0.8 2019-07-26 09:39:40 304 | 1. Add new user command Version 305 | 306 | # Dado Release 0.0.7 2019-07-24 09:22:10 307 | 1. Generalize UCMD installation for any project 308 | 2. Enhance user command process 309 | 310 | # Dado Release 0.0.6 2019-07-20 17:33:54 311 | 1. Refactor user command code 312 | 313 | # Dado Release 0.0.5 2019-07-19 09:16:01 314 | 1. Add automatic UCMD install 315 | 316 | # Dado Release 0.0.4 2019-07-18 17:34:20 317 | 1. Implement as user command 318 | 2. Add ReleaseExperimentalVersion function 319 | 3. Fix ShowChanges output 320 | 321 | # Dado Release 0.0.3 2019-02-07 10:04:30 322 | 1. Add testing framework, other misc changes 323 | 324 | # Dado Release 0.0.2 2019-02-06 13:32:14 325 | 1. Fix value error on missing ApplicationStartup parameter (Issue #3) 326 | 327 | # Dado Release 0.0.1 2019-01-12 13:05:39 328 | 1. Changes 329 | 2. Changes 330 | 3. Changes 331 | 4. Changes... 332 | 5. changes 333 | 6. Changes 334 | 7. Changes 335 | 8. Update README.md 336 | 9. Clean up 337 | 10. More changes 338 | 11. cleanup 339 | 12. Make left arg consistent 340 | 13. Clean up 341 | 14. Rename some functions 342 | 15. Fix quad lx 343 | 16. Move Git code up 344 | 17. clean up 345 | 18. Cleanup 346 | 19. Use release instead of version 347 | 20. Add extra heading level to app notes 348 | 21. Change release note file names 349 | 22. Fix release not bugs 350 | 23. Revamp release notes 351 | 24. Add application release notes. 352 | 25. Automate release process 353 | 26. Replace Acre Load with Open to reflect new Acre version. 354 | 27. Acre renaming 355 | 28. Changes 356 | 29. Changes to NewVersionBranch 357 | 30. Change to PullMaster, etc. 358 | 31. Cleanup 359 | 32. Version 0.0.0 360 | 33. New flow functions, etc. 361 | 34. Fix to ProcessLog so renames are handled properly. 362 | 35. New Git utilities for history. 363 | 36. Update package.json 364 | 37. Create package.json 365 | 38. Redo of BuildApplication 366 | 39. Changes to build application process 367 | 40. Fix to BuildApplication_ 368 | 41. Added BuildID and BuildDate to package config file. 369 | 42. []NA for windows 370 | 43. TempDir user V17 i-beam 371 | 44. Add caching 372 | 45. Fix for empty folder name 373 | 46. Enhanced function keys and other changes. 374 | 47. Add Help function and change PFKeys 375 | 48. Integrate new Acre Refresh function. 376 | 49. Combined uncommitted and committed changes to one function. 377 | 50. New Git functions, PFKEYS, etc. 378 | 51. Add DeleteBranch, changed MergeToMaster 379 | 52. New Git functions 380 | 53. quad vars and fix fqdn 381 | 54. get out if no foos 382 | 55. git tools refactor 383 | 56. removed obsolete functions 384 | 57. Add better filepath translation 385 | 58. translate file path to ws path 386 | 59. Use AcreConfig namespace provided by ACRE on OpenProject 387 | 60. Cleanup and various changes 388 | 61. Update README.md 389 | 62. Universal GUID function 390 | 63. Get system temp dir 391 | 64. Win and Linux compatible DeleteFolder 392 | 65. Changed Folder Structure for Packages, etc. 393 | 66. APLVersion structure 394 | 67. Changes 395 | 68. Changes 396 | 69. Cleanup 397 | 70. Allow correct language detection 398 | 71. Wholesale chantges... 399 | 72. changes 400 | 73. Update README.md 401 | 74. BuildApplication function added 402 | 75. git utilities 403 | 76. Changes to BuildPackage, etc. 404 | 77. Changes 405 | 78. Update README.md 406 | 79. Update README.md 407 | 80. Update README.md 408 | 81. Added RunInProcess function 409 | 82. Added SetAcreConfig 410 | 83. Update README.md 411 | 84. Added SetReference Function 412 | 85. Changes 413 | 86. Changes 414 | 87. Changes 415 | 88. Changes 416 | 89. Update README.md 417 | 90. Update README.md 418 | 91. Update README.md 419 | 92. Initial commit 420 | -------------------------------------------------------------------------------- /acre.config: -------------------------------------------------------------------------------- 1 | { 2 | "API": "Main.BuildAPI", 3 | "CaseCode": "On", 4 | "DevelopmentFolders": [ 5 | "Assets/RandD/" 6 | ], 7 | "KeepHistory": "Off", 8 | "StartUp": "QuadLX 0", 9 | "URL": "https://github.com/the-carlisle-group/Dado", 10 | "Version": "0.0.91" 11 | } 12 | --------------------------------------------------------------------------------