Skip to content

Commit 541a3a2

Browse files
Merge branch 'develop'
2 parents 1c8601d + 978a9d3 commit 541a3a2

File tree

160 files changed

+253278
-13017
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+253278
-13017
lines changed

.config/dotnet-tools.json

+28-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {
5-
"paket": {
6-
"version": "7.0.0-alpha003",
7-
"commands": [
8-
"paket"
9-
]
10-
},
11-
"aardpack": {
12-
"version": "1.0.10",
13-
"commands": [
14-
"aardpack"
15-
]
16-
}
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"paket": {
6+
"version": "7.0.0-alpha003",
7+
"commands": [
8+
"paket"
9+
]
10+
},
11+
"aardpack": {
12+
"version": "1.0.10",
13+
"commands": [
14+
"aardpack"
15+
]
16+
},
17+
"adaptify": {
18+
"version": "1.1.9",
19+
"commands": [
20+
"adaptify"
21+
]
22+
},
23+
"fantomas": {
24+
"version": "6.2.3",
25+
"commands": [
26+
"fantomas"
27+
]
1728
}
18-
}
29+
}
30+
}

.github/workflows/deploy.yml

+5-20
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,17 @@ on:
66
- aardium/package.json
77
- .github/workflows/deploy.yml
88
jobs:
9-
mac_arm64:
10-
name: OSX (arm64)
11-
runs-on: macos-latest
12-
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v2
15-
- uses: actions/checkout@v2
16-
- name: Setup .NET 6.0
17-
uses: actions/setup-dotnet@v1
18-
with:
19-
dotnet-version: 6.0.x
20-
- name: Yarn Install
21-
working-directory: aardium
22-
run: yarn install
23-
- name: Add Cert to Keychain
24-
uses: apple-actions/import-codesign-certs@v1
25-
with:
26-
p12-file-base64: ${{ secrets.MAC_CERT_BASE64 }}
27-
p12-password: ${{ secrets.MAC_CERT_PASSWORD }}
28-
299
mac_x64:
3010
name: OSX (x64)
3111
runs-on: macos-latest
3212
steps:
3313
- name: Checkout
3414
uses: actions/checkout@v2
15+
- name: Install Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.11'
19+
architecture: 'x64'
3520
- name: Setup .NET 6.0
3621
uses: actions/setup-dotnet@v1
3722
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,4 @@ src\Aardvark.OpcViewer.psess
8080
/aardium/build/build/
8181
/aardium/dist
8282
/aardium/yarn-error.log
83+
/provex/result.obj

Build.fs

+109-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ open System.IO
55
open Fake.Core
66
open Fake.Core.TargetOperators
77
open Fake.DotNet
8+
open Fake.Tools
9+
open Fake.IO.Globbing.Operators
810

911
open Fake.IO
1012
open Fake.Api
1113
open Fake.Tools.Git
1214

1315
open System.IO.Compression
1416
open System.Runtime.InteropServices
17+
open System.Text.RegularExpressions
1518

1619
initializeContext()
1720

@@ -411,7 +414,7 @@ Target.create "Publish" (fun _ ->
411414
// 1. publish exe
412415
"src/PRo3D.Viewer/PRo3D.Viewer.fsproj" |> DotNet.publish (fun o ->
413416
{ o with
414-
Framework = Some "net5.0"
417+
Framework = Some "net6.0"
415418
Runtime = Some "win10-x64" //-p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true
416419
Common = { o.Common with CustomParams = Some "-p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -p:InPublish=True -p:DebugType=None -p:DebugSymbols=false -p:BuildInParallel=false" }
417420
//SelfContained = Some true // https://github.com/dotnet/sdk/issues/10566#issuecomment-602111314
@@ -424,7 +427,7 @@ Target.create "Publish" (fun _ ->
424427
// 1. publish exe
425428
"src/PRo3D.Viewer/PRo3D.Viewer.fsproj" |> DotNet.publish (fun o ->
426429
{ o with
427-
Framework = Some "net5.0"
430+
Framework = Some "net6.0"
428431
Runtime = Some "osx-x64"
429432
Common = { o.Common with CustomParams = Some "-p:InPublish=True -p:DebugType=None -p:DebugSymbols=false -p:BuildInParallel=false" }
430433
//SelfContained = Some true // https://github.com/dotnet/sdk/issues/10566#issuecomment-602111314
@@ -600,6 +603,108 @@ Target.create "GitHubRelease" (fun _ ->
600603
)
601604

602605

606+
Target.create "Pack" (fun _ ->
607+
let args =
608+
[
609+
"paket"
610+
"pack"
611+
"--version"
612+
notes.NugetVersion
613+
"--interproject-references"
614+
"fix"
615+
"--release-notes"
616+
sprintf "\"%s\"" (String.concat "\\n" notes.Notes)
617+
"--project-url"
618+
"\"https://github.com/pro3d-space/PRo3D\""
619+
sprintf "\"%s\"" (Path.Combine(__SOURCE_DIRECTORY__, "bin"))
620+
]
621+
let ret =
622+
Process.shellExec {
623+
ExecParams.Program = "dotnet"
624+
WorkingDir = __SOURCE_DIRECTORY__
625+
CommandLine = String.concat " " args
626+
Args = []
627+
}
628+
if ret <> 0 then failwithf "paket failed with exit code %d" ret
629+
630+
"./src/opc-tool/opc-tool.fsproj" |> DotNet.pack (fun o ->
631+
{ o with
632+
NoRestore = true
633+
NoBuild = true
634+
MSBuildParams = { o.MSBuildParams with DisableInternalBinLog = true; Properties = ["Version", notes.NugetVersion] }
635+
}
636+
)
637+
)
638+
639+
Target.create "Push" (fun _ ->
640+
let packageNameRx = Regex @"^(?<name>[a-zA-Z_0-9\.-]+?)\.(?<version>([0-9]+\.)*[0-9]+.*?)\.nupkg$"
641+
642+
//if not (Git.Information.isCleanWorkingCopy ".") then
643+
// Git.Information.showStatus "."
644+
// failwith "repo not clean"
645+
646+
647+
if File.exists "deploy.targets" then
648+
let packages =
649+
!!"bin/*.nupkg"
650+
|> Seq.filter (fun path ->
651+
let name = Path.GetFileName path
652+
let m = packageNameRx.Match name
653+
if m.Success then
654+
m.Groups.["version"].Value = notes.NugetVersion
655+
else
656+
false
657+
)
658+
|> Seq.toList
659+
660+
let targetsAndKeys =
661+
File.ReadAllLines "deploy.targets"
662+
|> Array.map (fun l -> l.Split(' '))
663+
|> Array.choose (function [|dst; key|] -> Some (dst, key) | _ -> None)
664+
|> Array.choose (fun (dst, key) ->
665+
let path =
666+
Path.Combine(
667+
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
668+
".ssh",
669+
key
670+
)
671+
printfn "exists? %s" path
672+
if File.exists path then
673+
let key = File.ReadAllText(path).Trim()
674+
Some (dst, key)
675+
else
676+
None
677+
)
678+
|> Map.ofArray
679+
680+
681+
//Git.CommandHelper.directRunGitCommandAndFail "." "fetch --tags"
682+
//Git.Branches.tag "." notes.NugetVersion
683+
684+
//let branch = Git.Information.getBranchName "."
685+
//Git.Branches.pushBranch "." "origin" branch
686+
687+
if List.isEmpty packages then
688+
failwith "no packages produced"
689+
690+
if Map.isEmpty targetsAndKeys then
691+
failwith "no deploy targets"
692+
693+
for (dst, key) in Map.toSeq targetsAndKeys do
694+
Trace.tracefn "pushing to '%s'." dst
695+
let options (o : Paket.PaketPushParams) =
696+
{ o with
697+
PublishUrl = dst
698+
ApiKey = key
699+
WorkingDir = "bin"
700+
}
701+
702+
Paket.pushFiles options packages
703+
704+
//Git.Branches.pushTag "." "origin" notes.NugetVersion
705+
()
706+
)
707+
603708
"Publish" ==> "GithubRelease" |> ignore
604709

605710
Target.create "Run" (fun _ ->
@@ -610,6 +715,8 @@ Target.create "Run" (fun _ ->
610715
"AddNativeResources" ==> "CopyJRWrapper" ==> "Publish" |> ignore
611716
"AddNativeResources" ==> "PublishToElectron" |> ignore
612717
"Credits" ==> "PublishToElectron" |> ignore
718+
"Compile" ==> "Pack" |> ignore
719+
"Pack" ==> "Push" |> ignore
613720

614721
[<EntryPoint>]
615722
let main args =

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ The process for contributing to PRo3D is optimized for easy peer reviews by the
55
* Discuss the feature with the community. High-frequency discussion should happen in our discord channel
66
* Implement the feature in a feature branch `features/[issue#]_thename` or `bugs/[issue#]_bugname`
77
* Create a PullRequest (PR), ask for contributors to review the PR and merge the PR when done
8-
* For creating a new release (in develop), change the PRODUCT_RELEASE_NOTES.md / package.json accordingly. For details please look at https://github.com/pro3d-space/PRo3D/blob/main/docs/Build-Deploy-System.md
8+
* For creating a new release, change the PRODUCT_RELEASE_NOTES.md / package.json accordingly. For details please look at https://github.com/pro3d-space/PRo3D/blob/main/docs/Build-Deploy-System.md
99
* The CI will trigger a build and create a tag accordingly
1010
* Please put into the release - the version, humand readable description of the new features/fixes and references to issues etc. (in github choose the release, press edit button, apply the changes and use "publish release")

0 commit comments

Comments
 (0)