Skip to content

Commit 3c8e33b

Browse files
authored
build(BouncyCastle): initial commit (#7)
1 parent 91e9846 commit 3c8e33b

8 files changed

Lines changed: 61 additions & 5 deletions

File tree

.github/workflows/csharp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- uses: cachix/install-nix-action@v30
1313
- name: Build UPM packages
14-
run: nix develop -c just
14+
run: nix develop -c just all
1515
- name: Upload artifacts
1616
uses: actions/upload-artifact@v4.4.0
1717
with:

justfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
default: all
1+
default:
2+
just --list
23

3-
all:
4+
all: base128 simplebase bouncycastle
5+
6+
base128:
47
just msbuild/Base128/
8+
9+
bouncycastle:
10+
just msbuild/BouncyCastle/
11+
12+
simplebase:
513
just msbuild/SimpleBase/

msbuild/Base128/justfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
git_repo := "https://github.com/Wojmik/Base128.git"
22
git_ref := "Version_1.2.2"
33
dll_name := "Base128.dll"
4-
lib_name := "Base128"
54
dotnet_framework := "netstandard2.1"
65
csproj_relative_path := "Base128" / "Base128.csproj"
76
out_dir := invocation_directory() / "build"

msbuild/BouncyCastle/BouncyCastle.Cryptography.dll.meta

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

msbuild/BouncyCastle/justfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
git_repo := "https://github.com/bcgit/bc-csharp.git"
2+
git_ref := "release-2.5.0"
3+
dll_name := "BouncyCastle.Cryptography.dll"
4+
dotnet_framework := "netstandard2.0"
5+
csproj_relative_path := "crypto" / "src" / "BouncyCastle.Crypto.csproj"
6+
out_dir := invocation_directory() / "build"
7+
8+
working_dir := `mktemp -d`
9+
repo_dir := working_dir / "repo"
10+
dotnet_artifact_dir := working_dir / "dotnet_artifacts"
11+
upm_contents_dir := working_dir / "upm_contents"
12+
csproj_path := repo_dir / csproj_relative_path
13+
14+
default: assemble_upm
15+
16+
# Clean build outputs
17+
clean:
18+
rm -rf {{working_dir}}
19+
20+
clone:
21+
git clone --single-branch --branch {{git_ref}} {{git_repo}} {{repo_dir}}
22+
23+
build: clone
24+
dotnet build {{csproj_path}} --configuration Release -o {{dotnet_artifact_dir}} --framework {{dotnet_framework}}
25+
26+
assemble_upm: clone build && clean
27+
mkdir -p {{upm_contents_dir}}
28+
cp {{dotnet_artifact_dir / dll_name}} {{upm_contents_dir}}
29+
cp package.json {{upm_contents_dir}}
30+
cp *.meta {{upm_contents_dir}}
31+
mkdir -p {{out_dir}}
32+
npm pack --pack-destination {{out_dir}} {{upm_contents_dir}}

msbuild/BouncyCastle/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "org.basisvr.bouncycastle",
3+
"version": "2.5.0",
4+
"displayName": "BouncyCastle.Cryptography",
5+
"description": "The Bouncy Castle Cryptography library",
6+
"documentationUrl": "https://github.com/bcgit/bc-csharp",
7+
"publishConfig": { "registry": "https://npm.pkg.github.com/@BasisVR" },
8+
"repository":"https://github.com/BasisVR/UpmBuilds"
9+
}

msbuild/BouncyCastle/package.json.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

msbuild/SimpleBase/justfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
git_repo := "https://github.com/ssg/SimpleBase.git"
22
git_ref := "4.0.2"
33
dll_name := "SimpleBase.dll"
4-
lib_name := "SimpleBase"
54
dotnet_framework := "netstandard2.1"
65
csproj_relative_path := "src" / "SimpleBase.csproj"
76
out_dir := invocation_directory() / "build"

0 commit comments

Comments
 (0)