@positron-js/cli 1.0.7 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/content/app/PositronApp/PositronApp.csproj +35 -21
- package/content/build-android.js +53 -0
- package/content/build-android.js.map +1 -0
- package/{build-android.jsx → content/build-android.jsx} +90 -85
- package/{build-ios.jsx → content/build-ios.jsx} +110 -107
- package/content/common.jsx +85 -0
- package/content/common.jsx.mjs +74 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/init/init.js +4 -10
- package/dist/commands/init/init.js.map +1 -1
- package/dist/commands/sync/sync.js.map +1 -1
- package/dist/core/LocalFile.js.map +1 -1
- package/dist/cwd/cwd.d.ts +1 -1
- package/dist/cwd/cwd.d.ts.map +1 -1
- package/dist/cwd/cwd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -3
- package/src/cli.ts +1 -1
- package/src/commands/init/init.ts +4 -12
- package/src/commands/sync/sync.ts +2 -2
- package/src/core/LocalFile.ts +1 -1
- package/src/cwd/cwd.ts +2 -2
- package/{build-android.config.js → template/build-android.config.js} +29 -29
- package/{build-ios.config.js → template/build-ios.config.js} +26 -26
- package/template/cert/android.keystore +1 -0
- package/template/cert/ios-app.mobileprovision +1 -0
- package/template/cert/ios-distribution.p12 +1 -0
- package/template/config/google-services.json +3 -0
- package/template/privacy-policy.md +1 -0
- package/template/res/app-icon-background.svg +42 -0
- package/template/res/app-icon.droid.svg +41 -0
- package/template/res/app-icon.ios.svg +41 -0
- package/template/res/splash.svg +41 -0
- package/tests/android/README.md +2 -0
- package/tests/android/build-android.config.js +30 -0
- package/tests/android/config/google-services.json +3 -0
- package/tests/android/package-lock.json +12 -0
- package/tests/android/package.json +4 -0
- package/tests/android/res/app-icon-background.svg +42 -0
- package/tests/android/res/app-icon.droid.svg +41 -0
- package/tests/android/res/app-icon.ios.svg +41 -0
- package/tests/android/res/splash.svg +41 -0
- package/tsconfig.json +1 -1
- package/content/app/PositronApp/Resources/Images/dotnet_bot.svg +0 -8
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Installation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## init
|
|
4
|
+
```
|
|
5
|
+
npx @positron-js/cli init
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
## build
|
|
9
|
+
```
|
|
10
|
+
npx @neurospeech/jex /node_modules/@positron-js/cli/content/build-android.jsx
|
|
11
|
+
```
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<Project Sdk="Microsoft.NET.Sdk">
|
|
2
2
|
|
|
3
3
|
<PropertyGroup>
|
|
4
|
-
<TargetFrameworks>
|
|
4
|
+
<TargetFrameworks>net10.0-ios;net10.0-android;</TargetFrameworks>
|
|
5
5
|
<!--<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net7.0-windows10.0.19041</TargetFrameworks> -->
|
|
6
6
|
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
|
|
7
7
|
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
|
|
43
43
|
<ArchiveOnBuild>true</ArchiveOnBuild>
|
|
44
44
|
</PropertyGroup>
|
|
45
|
-
<PropertyGroup Condition="'$(TargetFramework)'=='
|
|
45
|
+
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
|
|
46
46
|
<UseInterpreter>true</UseInterpreter>
|
|
47
47
|
<MTouchInterpreter>all</MTouchInterpreter>
|
|
48
48
|
<MtouchLink>None</MtouchLink>
|
|
@@ -52,25 +52,39 @@
|
|
|
52
52
|
</PropertyGroup>
|
|
53
53
|
|
|
54
54
|
<ItemGroup>
|
|
55
|
-
<PackageReference Include="NeuroSpeech.Positron" Version="1.2.
|
|
55
|
+
<PackageReference Include="NeuroSpeech.Positron" Version="1.2.33" />
|
|
56
56
|
<PackageReference Include="Plugin.Maui.CalendarStore" Version="4.0.0" />
|
|
57
|
-
<PackageReference Include="Microsoft.Maui.Controls" Version="
|
|
58
|
-
<PackageReference Update="Microsoft.Maui.Controls.Compatibility" Version="
|
|
59
|
-
<PackageReference Include="Microsoft.Maui.Essentials" Version="
|
|
60
|
-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="
|
|
61
|
-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="
|
|
57
|
+
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.31" />
|
|
58
|
+
<PackageReference Update="Microsoft.Maui.Controls.Compatibility" Version="10.0.31" />
|
|
59
|
+
<PackageReference Include="Microsoft.Maui.Essentials" Version="10.0.31" />
|
|
60
|
+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.2" />
|
|
61
|
+
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.2" />
|
|
62
62
|
</ItemGroup>
|
|
63
63
|
|
|
64
|
+
<ItemGroup Condition="$(TargetFramework.Contains('-ios'))">
|
|
65
|
+
<MauiIcon
|
|
66
|
+
Include="Resources\AppIcon\appicon.svg"
|
|
67
|
+
ForegroundFile="Resources\AppIcon\appicon.ios.svg"
|
|
68
|
+
Color="$(MAUI_ICON_IOS_COLOR)"
|
|
69
|
+
/>
|
|
70
|
+
</ItemGroup>
|
|
71
|
+
<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
|
|
72
|
+
<MauiIcon
|
|
73
|
+
Include="Resources\AppIcon\appicon.svg"
|
|
74
|
+
ForegroundFile="Resources\AppIcon\appicon.droid.svg"
|
|
75
|
+
Color="$(MAUI_ICON_DROID_COLOR)" />
|
|
76
|
+
</ItemGroup>
|
|
77
|
+
|
|
64
78
|
<ItemGroup>
|
|
65
|
-
|
|
66
|
-
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
|
|
67
|
-
|
|
79
|
+
|
|
68
80
|
<!-- Splash Screen -->
|
|
69
|
-
<MauiSplashScreen
|
|
81
|
+
<MauiSplashScreen
|
|
82
|
+
Include="Resources\Splash\splash.svg"
|
|
83
|
+
Color="$(MAUI_SPLASH_SCREEN_COLOR)"
|
|
84
|
+
BaseSize="$(MAUI_SPLASH_BASE_SIZE)" />
|
|
70
85
|
|
|
71
86
|
<!-- Images -->
|
|
72
|
-
<MauiImage Include="Resources\Images\*" />
|
|
73
|
-
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
|
|
87
|
+
<MauiImage Include="Resources\Images\*" />
|
|
74
88
|
|
|
75
89
|
<!-- Custom Fonts -->
|
|
76
90
|
<MauiFont Include="Resources\Fonts\*" />
|
|
@@ -82,13 +96,13 @@
|
|
|
82
96
|
<ItemGroup Condition="$(TargetFramework.Contains('-android'))">
|
|
83
97
|
|
|
84
98
|
<!-- <PackageReference Include="Xamarin.GooglePlayServices.Location" Version="121.0.1.4" /> -->
|
|
85
|
-
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.5.0.
|
|
86
|
-
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.5.0.
|
|
87
|
-
<PackageReference Include="Xamarin.AndroidX.SavedState" Version="1.
|
|
88
|
-
<PackageReference Include="Xamarin.AndroidX.SavedState.SavedState.Android" Version="1.
|
|
89
|
-
<PackageReference Include="Xamarin.AndroidX.Activity" Version="1.
|
|
90
|
-
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.
|
|
91
|
-
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.8.
|
|
99
|
+
<PackageReference Include="Xamarin.AndroidX.Collection" Version="1.5.0.4" />
|
|
100
|
+
<PackageReference Include="Xamarin.AndroidX.Collection.Ktx" Version="1.5.0.4" />
|
|
101
|
+
<PackageReference Include="Xamarin.AndroidX.SavedState" Version="1.4.0.1" />
|
|
102
|
+
<PackageReference Include="Xamarin.AndroidX.SavedState.SavedState.Android" Version="1.4.0.1" />
|
|
103
|
+
<PackageReference Include="Xamarin.AndroidX.Activity" Version="1.12.2.1" />
|
|
104
|
+
<PackageReference Include="Xamarin.AndroidX.Activity.Ktx" Version="1.12.2.1" />
|
|
105
|
+
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.8.9.1" />
|
|
92
106
|
|
|
93
107
|
<!-- <GoogleServicesJson Include="config\google-services.json" /> -->
|
|
94
108
|
</ItemGroup>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import XNode from "@neurospeech/jex/dist/core/XNode.js";
|
|
2
|
+
import { invoke, Batch, Run, mask } from "@neurospeech/jex/index.js";
|
|
3
|
+
import { FileSystem } from "@neurospeech/jex/dist/utils/FileSystem.js";
|
|
4
|
+
import { PlayStore } from "@neurospeech/jex/dist/ci/android/PlayStore.js";
|
|
5
|
+
import { Build } from "@neurospeech/jex/dist/ci/build/Build.js";
|
|
6
|
+
import assert from "assert";
|
|
7
|
+
import { Common } from "./common.js";
|
|
8
|
+
import configs from "../build-android.config.js";
|
|
9
|
+
let applicationDisplayVersion;
|
|
10
|
+
let applicationVersion;
|
|
11
|
+
for (const config of configs) {
|
|
12
|
+
if (!config) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
await invoke(XNode.create(Batch, null, () => "\n\n ", () => "\n\n ", () => XNode.create(Build.PrepareVersion, {
|
|
16
|
+
mode: config.buildNumber,
|
|
17
|
+
then: x => (applicationDisplayVersion = `${x.major}.${x.minor}`, applicationVersion = x.build),
|
|
18
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 27,8"
|
|
19
|
+
}), () => "\n\n ", () => XNode.create(Common.PreBuild, {
|
|
20
|
+
positronAppDir: positronAppDir,
|
|
21
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 32,8"
|
|
22
|
+
}), () => "\n\n ", () => XNode.create(FileSystem.MergeJson, {
|
|
23
|
+
json: {
|
|
24
|
+
App: {
|
|
25
|
+
Url: config.url
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
path: "./maui/PositronApp/appsettings.json",
|
|
29
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 34,8"
|
|
30
|
+
}), () => "\n\n ", () => (assert(applicationDisplayVersion), null), () => "\n ", () => (assert(applicationVersion), null), () => "\n\n ", () => XNode.create(Run, {
|
|
31
|
+
cmd: "dotnet",
|
|
32
|
+
timeout: 300000,
|
|
33
|
+
args: "workload install maui",
|
|
34
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 46,8"
|
|
35
|
+
}), () => "\n\n ", () => XNode.create(Run, {
|
|
36
|
+
cmd: "dotnet",
|
|
37
|
+
timeout: 300000,
|
|
38
|
+
args: "workload install android",
|
|
39
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 52,8"
|
|
40
|
+
}), () => "\n\n \n ", () => XNode.create(Run, {
|
|
41
|
+
cmd: "dotnet",
|
|
42
|
+
timeout: 240000,
|
|
43
|
+
logData: true,
|
|
44
|
+
args: ["publish", "-f", config.targetFramework, "-c", "Release", `/p:ApplicationId=${config.id}`, `/p:ApplicationTitle=${config.name}`, `/p:ApplicationVersion=${applicationVersion}`, `/p:ApplicationDisplayVersion=${applicationDisplayVersion}`, "/p:AndroidKeyStore=true", `/p:AndroidSigningKeyAlias=${config.androidSigningKeyAlias}`, `/p:AndroidSigningKeyStore=${config.androidKeyStore}`, mask`/p:AndroidSigningStorePass=${config.androidKeyStorePassword}`, mask`/p:AndroidSigningKeyPass=${config.androidKeyStorePassword}`, config.androidSdkRoot ? `/p:AndroidSdkPath=${config.androidSdkRoot}` : void 0, config.javaHome ? `/p:JavaSdkDirectory=${config.javaHome}` : void 0, "./maui/PositronApp/PositronApp.csproj"],
|
|
45
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 59,8"
|
|
46
|
+
}), () => "\n\n ", () => XNode.create(PlayStore.Upload, {
|
|
47
|
+
packageName: config.id,
|
|
48
|
+
releaseFiles: [`./maui/PositronApp/bin/Release/${config.targetFramework}/publish/*-Signed.apk`],
|
|
49
|
+
serviceAccountJsonRaw: config.serviceAccountJsonRaw,
|
|
50
|
+
serviceAccountJson: config.serviceAccountJson,
|
|
51
|
+
location: "D:\\git\\github\\positron\\cli\\content\\build-android.jsx 80,8"
|
|
52
|
+
}), () => "\n\n "));
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["XNode","invoke","Batch","Run","mask","FileSystem","PlayStore","Build","assert","Common","configs","applicationDisplayVersion","applicationVersion","config","create","PrepareVersion","mode","buildNumber","then","x","major","minor","build","location","PreBuild","positronAppDir","MergeJson","json","App","Url","url","path","cmd","timeout","args","logData","targetFramework","id","name","androidSigningKeyAlias","androidKeyStore","androidKeyStorePassword","androidSdkRoot","javaHome","Upload","packageName","releaseFiles","serviceAccountJsonRaw","serviceAccountJson"],"sources":["build-android.jsx"],"sourcesContent":["import XNode from \"@neurospeech/jex/dist/core/XNode.js\";import { invoke, Batch, Run, mask } from \"@neurospeech/jex/index.js\";\r\nimport { FileSystem } from \"@neurospeech/jex/dist/utils/FileSystem.js\";\r\nimport { PlayStore } from \"@neurospeech/jex/dist/ci/android/PlayStore.js\";\r\nimport { Build } from \"@neurospeech/jex/dist/ci/build/Build.js\";\r\nimport assert from \"assert\";\r\nimport { Common } from \"./common.jsx\";\r\n\r\nimport configs from \"../build-android.config.js\";\r\n\r\nlet applicationDisplayVersion;\r\nlet applicationVersion;\r\n\r\nfor(const config of configs) {\r\n\r\n if (!config) {\r\n continue;\r\n }\r\n\r\n await invoke(<Batch>\r\n\r\n {/* <Run\r\n cmd=\"dotnet\"\r\n throwOnFail={false}\r\n args=\"nuget locals all --clear\"\r\n /> */}\r\n\r\n <Build.PrepareVersion\r\n mode={config.buildNumber}\r\n then={(x) => (applicationDisplayVersion = `${x.major}.${x.minor}`, applicationVersion = x.build)}\r\n />\r\n\r\n <Common.PreBuild positronAppDir={positronAppDir} />\r\n\r\n <FileSystem.MergeJson\r\n json={({\r\n App: {\r\n Url: config.url\r\n }\r\n })}\r\n path=\"./maui/PositronApp/appsettings.json\"\r\n />\r\n\r\n { assert(applicationDisplayVersion) }\r\n { assert(applicationVersion) }\r\n\r\n <Run\r\n cmd=\"dotnet\"\r\n timeout={300000}\r\n args=\"workload install maui\"\r\n />\r\n\r\n <Run\r\n cmd=\"dotnet\"\r\n timeout={300000}\r\n args=\"workload install android\"\r\n />\r\n\r\n \r\n <Run\r\n cmd=\"dotnet\"\r\n timeout={240000}\r\n logData={true}\r\n args={[\"publish\",\r\n \"-f\", config.targetFramework,\r\n \"-c\", \"Release\",\r\n `/p:ApplicationId=${config.id}`,\r\n `/p:ApplicationTitle=${config.name}`,\r\n `/p:ApplicationVersion=${applicationVersion}`,\r\n `/p:ApplicationDisplayVersion=${applicationDisplayVersion}`,\r\n \"/p:AndroidKeyStore=true\",\r\n `/p:AndroidSigningKeyAlias=${config.androidSigningKeyAlias}`,\r\n `/p:AndroidSigningKeyStore=${config.androidKeyStore}`,\r\n mask `/p:AndroidSigningStorePass=${config.androidKeyStorePassword}`,\r\n mask `/p:AndroidSigningKeyPass=${config.androidKeyStorePassword}`,\r\n config.androidSdkRoot ? `/p:AndroidSdkPath=${config.androidSdkRoot}` : void 0,\r\n config.javaHome ? `/p:JavaSdkDirectory=${config.javaHome}`: void 0,\r\n \"./maui/PositronApp/PositronApp.csproj\"]}\r\n />\r\n\r\n <PlayStore.Upload\r\n packageName={config.id}\r\n releaseFiles={[`./maui/PositronApp/bin/Release/${config.targetFramework}/publish/*-Signed.apk`]}\r\n serviceAccountJsonRaw={config.serviceAccountJsonRaw}\r\n serviceAccountJson={config.serviceAccountJson}\r\n />\r\n\r\n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EAAElC,MAAM,CAACkC,qBAAsB;IACpDC,kBAAkB,EAAEnC,MAAM,CAACmC,kBAAmB;IAAAzB,QAAA;EAAA,CAC7C,CAAC,kBAEH,CAAC,CAAC;AACb","ignoreList":[]}
|
|
@@ -1,86 +1,91 @@
|
|
|
1
|
-
import { invoke, Batch, Run, mask } from "@neurospeech/jex/index.js";
|
|
2
|
-
import { FileSystem } from "@neurospeech/jex/dist/utils/FileSystem.js";
|
|
3
|
-
import { PlayStore } from "@neurospeech/jex/dist/ci/android/PlayStore.js";
|
|
4
|
-
import { Build } from "@neurospeech/jex/dist/ci/build/Build.js";
|
|
5
|
-
import assert from "assert";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
69
|
-
`/p:
|
|
70
|
-
`/p:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
import { invoke, Batch, Run, mask } from "@neurospeech/jex/index.js";
|
|
2
|
+
import { FileSystem } from "@neurospeech/jex/dist/utils/FileSystem.js";
|
|
3
|
+
import { PlayStore } from "@neurospeech/jex/dist/ci/android/PlayStore.js";
|
|
4
|
+
import { Build } from "@neurospeech/jex/dist/ci/build/Build.js";
|
|
5
|
+
import assert from "assert";
|
|
6
|
+
import { Common } from "./common.jsx";
|
|
7
|
+
import { pathToFileURL } from "url";
|
|
8
|
+
import { resolve } from "path";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
let applicationDisplayVersion;
|
|
12
|
+
let applicationVersion;
|
|
13
|
+
|
|
14
|
+
const { default: configs } = await import( pathToFileURL( resolve("./build-android.config.js")));
|
|
15
|
+
|
|
16
|
+
for(const config of configs) {
|
|
17
|
+
|
|
18
|
+
if (!config) {
|
|
19
|
+
continue;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
await invoke(<Batch>
|
|
23
|
+
|
|
24
|
+
{/* <Run
|
|
25
|
+
cmd="dotnet"
|
|
26
|
+
throwOnFail={false}
|
|
27
|
+
args="nuget locals all --clear"
|
|
28
|
+
/> */}
|
|
29
|
+
|
|
30
|
+
<Build.PrepareVersion
|
|
31
|
+
mode={config.buildNumber}
|
|
32
|
+
then={(x) => (applicationDisplayVersion = `${x.major}.${x.minor}`, applicationVersion = x.build)}
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<Common.PreBuild />
|
|
36
|
+
|
|
37
|
+
<FileSystem.MergeJson
|
|
38
|
+
json={({
|
|
39
|
+
App: {
|
|
40
|
+
Url: config.url
|
|
41
|
+
}
|
|
42
|
+
})}
|
|
43
|
+
path="./maui/PositronApp/appsettings.json"
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
{ assert(applicationDisplayVersion) }
|
|
47
|
+
{ assert(applicationVersion) }
|
|
48
|
+
|
|
49
|
+
<Run
|
|
50
|
+
cmd="dotnet"
|
|
51
|
+
timeout={300000}
|
|
52
|
+
args="workload install maui"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<Run
|
|
56
|
+
cmd="dotnet"
|
|
57
|
+
timeout={300000}
|
|
58
|
+
args="workload install android"
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
<Run
|
|
63
|
+
cmd="dotnet"
|
|
64
|
+
timeout={240000}
|
|
65
|
+
logData={true}
|
|
66
|
+
args={["publish",
|
|
67
|
+
"-f", config.targetFramework,
|
|
68
|
+
"-c", "Release",
|
|
69
|
+
`/p:ApplicationId=${config.id}`,
|
|
70
|
+
`/p:ApplicationTitle=${config.name}`,
|
|
71
|
+
`/p:ApplicationVersion=${applicationVersion}`,
|
|
72
|
+
`/p:ApplicationDisplayVersion=${applicationDisplayVersion}`,
|
|
73
|
+
"/p:AndroidKeyStore=true",
|
|
74
|
+
`/p:AndroidSigningKeyAlias=${config.androidSigningKeyAlias}`,
|
|
75
|
+
`/p:AndroidSigningKeyStore=${config.androidKeyStore}`,
|
|
76
|
+
mask `/p:AndroidSigningStorePass=${config.androidKeyStorePassword}`,
|
|
77
|
+
mask `/p:AndroidSigningKeyPass=${config.androidKeyStorePassword}`,
|
|
78
|
+
config.androidSdkRoot ? `/p:AndroidSdkPath=${config.androidSdkRoot}` : void 0,
|
|
79
|
+
config.javaHome ? `/p:JavaSdkDirectory=${config.javaHome}`: void 0,
|
|
80
|
+
"./maui/PositronApp/PositronApp.csproj"]}
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<PlayStore.Upload
|
|
84
|
+
packageName={config.id}
|
|
85
|
+
releaseFiles={[`./maui/PositronApp/bin/Release/${config.targetFramework}/publish/*-Signed.apk`]}
|
|
86
|
+
serviceAccountJsonRaw={config.serviceAccountJsonRaw}
|
|
87
|
+
serviceAccountJson={config.serviceAccountJson}
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
</Batch>);
|
|
86
91
|
}
|
|
@@ -1,108 +1,111 @@
|
|
|
1
|
-
import { invoke, Batch, Run} from "@neurospeech/jex/index.js";
|
|
2
|
-
import { FileSystem } from "@neurospeech/jex/dist/utils/FileSystem.js";
|
|
3
|
-
import { AppleDev } from "@neurospeech/jex/dist/ci/mac/AppleDev.js";
|
|
4
|
-
import { Build } from "@neurospeech/jex/dist/ci/build/Build.js";
|
|
5
|
-
import { XCRun } from "@neurospeech/jex/dist/ci/mac/XCRun.js";
|
|
6
|
-
import assert from "assert";
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
`/p:
|
|
93
|
-
`/p:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
1
|
+
import { invoke, Batch, Run} from "@neurospeech/jex/index.js";
|
|
2
|
+
import { FileSystem } from "@neurospeech/jex/dist/utils/FileSystem.js";
|
|
3
|
+
import { AppleDev } from "@neurospeech/jex/dist/ci/mac/AppleDev.js";
|
|
4
|
+
import { Build } from "@neurospeech/jex/dist/ci/build/Build.js";
|
|
5
|
+
import { XCRun } from "@neurospeech/jex/dist/ci/mac/XCRun.js";
|
|
6
|
+
import assert from "assert";
|
|
7
|
+
import { Common } from "./common.jsx";
|
|
8
|
+
|
|
9
|
+
const { default: configs } = await import("../build-ios.config.js");
|
|
10
|
+
|
|
11
|
+
let applicationDisplayVersion;
|
|
12
|
+
let applicationVersion;
|
|
13
|
+
|
|
14
|
+
const keyChainPath= "./kc1.db";
|
|
15
|
+
|
|
16
|
+
let signingIdentity;
|
|
17
|
+
let provisioningProfile;
|
|
18
|
+
|
|
19
|
+
for (const config of configs) {
|
|
20
|
+
|
|
21
|
+
if (!config) {
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
await invoke(<Batch
|
|
26
|
+
cleanup={<Batch>
|
|
27
|
+
<AppleDev.Clear
|
|
28
|
+
keyChainPath={keyChainPath}
|
|
29
|
+
provisioningProfile={config.provisioningProfileFile}
|
|
30
|
+
/>
|
|
31
|
+
</Batch>}
|
|
32
|
+
>
|
|
33
|
+
|
|
34
|
+
<Common.PreBuild/>
|
|
35
|
+
|
|
36
|
+
<FileSystem.MergeJson
|
|
37
|
+
json={({
|
|
38
|
+
App: {
|
|
39
|
+
Url: config.url
|
|
40
|
+
}
|
|
41
|
+
})}
|
|
42
|
+
path="./maui/PositronApp/appsettings.json"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<Build.PrepareVersion
|
|
46
|
+
mode={config.buildNumber}
|
|
47
|
+
then={(x) => (applicationDisplayVersion = `${x.major}.${x.minor}`, applicationVersion = x.build)}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
{ assert(applicationDisplayVersion) }
|
|
51
|
+
{ assert(applicationVersion) }
|
|
52
|
+
|
|
53
|
+
<AppleDev.InstallCert
|
|
54
|
+
certPath={config.certPath}
|
|
55
|
+
certPass={config.certPass}
|
|
56
|
+
keyChainPath={keyChainPath}
|
|
57
|
+
keyChainPass=""
|
|
58
|
+
provisioningProfile={config.provisioningProfileFile}
|
|
59
|
+
then={(r) => (signingIdentity = r.friendlyName, provisioningProfile = r.pp.name)}
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
{ console.log(`Using identity ${signingIdentity}`)}
|
|
63
|
+
{ console.log(`Using profile ${provisioningProfile}`)}
|
|
64
|
+
|
|
65
|
+
{/* <Run
|
|
66
|
+
cmd="dotnet"
|
|
67
|
+
args="nuget locals all --clear"
|
|
68
|
+
/> */}
|
|
69
|
+
|
|
70
|
+
<Run
|
|
71
|
+
cmd="dotnet"
|
|
72
|
+
timeout={300000}
|
|
73
|
+
args="workload install maui"
|
|
74
|
+
/>
|
|
75
|
+
|
|
76
|
+
<Run
|
|
77
|
+
cmd="dotnet"
|
|
78
|
+
timeout={300000}
|
|
79
|
+
args="workload install android ios"
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<Run
|
|
84
|
+
cmd="dotnet"
|
|
85
|
+
timeout={600000}
|
|
86
|
+
logData={true}
|
|
87
|
+
args={["publish",
|
|
88
|
+
"-f", "net10.0-ios",
|
|
89
|
+
"-c", "Release",
|
|
90
|
+
"/p:BuildIpa=true",
|
|
91
|
+
"/p:RuntimeIdentifier=ios-arm64",
|
|
92
|
+
`/p:ApplicationId=${config.id}`,
|
|
93
|
+
`/p:ApplicationVersion=${applicationVersion}`,
|
|
94
|
+
`/p:ApplicationDisplayVersion=${applicationDisplayVersion}`,
|
|
95
|
+
`/p:CodesignKey=${signingIdentity}`,
|
|
96
|
+
`/p:CodesignProvision=${provisioningProfile}`,
|
|
97
|
+
"./maui/PositronApp/PositronApp.csproj"]}
|
|
98
|
+
/>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<XCRun.UploadApp
|
|
102
|
+
timeout={600000}
|
|
103
|
+
appPath="./maui/PositronApp/bin/Release/net10.0-ios/ios-arm64/publish/PositronApp.ipa"
|
|
104
|
+
appType="ios"
|
|
105
|
+
apiKeyId={config.appStoreConnect.apiKeyId}
|
|
106
|
+
issuerId={config.appStoreConnect.issuerId}
|
|
107
|
+
apiPrivateKey={config.appStoreConnect.privateKey}
|
|
108
|
+
/>
|
|
109
|
+
|
|
110
|
+
</Batch>);
|
|
108
111
|
}
|