Skip to content

Commit

Permalink
build(BouncyCastle): initial commit (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheButlah authored Feb 8, 2025
1 parent 91e9846 commit 3c8e33b
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/csharp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- name: Build UPM packages
run: nix develop -c just
run: nix develop -c just all
- name: Upload artifacts
uses: actions/[email protected]
with:
Expand Down
12 changes: 10 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
default: all
default:
just --list

all:
all: base128 simplebase bouncycastle

base128:
just msbuild/Base128/

bouncycastle:
just msbuild/BouncyCastle/

simplebase:
just msbuild/SimpleBase/
1 change: 0 additions & 1 deletion msbuild/Base128/justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
git_repo := "https://github.com/Wojmik/Base128.git"
git_ref := "Version_1.2.2"
dll_name := "Base128.dll"
lib_name := "Base128"
dotnet_framework := "netstandard2.1"
csproj_relative_path := "Base128" / "Base128.csproj"
out_dir := invocation_directory() / "build"
Expand Down
2 changes: 2 additions & 0 deletions msbuild/BouncyCastle/BouncyCastle.Cryptography.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions msbuild/BouncyCastle/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
git_repo := "https://github.com/bcgit/bc-csharp.git"
git_ref := "release-2.5.0"
dll_name := "BouncyCastle.Cryptography.dll"
dotnet_framework := "netstandard2.0"
csproj_relative_path := "crypto" / "src" / "BouncyCastle.Crypto.csproj"
out_dir := invocation_directory() / "build"

working_dir := `mktemp -d`
repo_dir := working_dir / "repo"
dotnet_artifact_dir := working_dir / "dotnet_artifacts"
upm_contents_dir := working_dir / "upm_contents"
csproj_path := repo_dir / csproj_relative_path

default: assemble_upm

# Clean build outputs
clean:
rm -rf {{working_dir}}

clone:
git clone --single-branch --branch {{git_ref}} {{git_repo}} {{repo_dir}}

build: clone
dotnet build {{csproj_path}} --configuration Release -o {{dotnet_artifact_dir}} --framework {{dotnet_framework}}

assemble_upm: clone build && clean
mkdir -p {{upm_contents_dir}}
cp {{dotnet_artifact_dir / dll_name}} {{upm_contents_dir}}
cp package.json {{upm_contents_dir}}
cp *.meta {{upm_contents_dir}}
mkdir -p {{out_dir}}
npm pack --pack-destination {{out_dir}} {{upm_contents_dir}}
9 changes: 9 additions & 0 deletions msbuild/BouncyCastle/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "org.basisvr.bouncycastle",
"version": "2.5.0",
"displayName": "BouncyCastle.Cryptography",
"description": "The Bouncy Castle Cryptography library",
"documentationUrl": "https://github.com/bcgit/bc-csharp",
"publishConfig": { "registry": "https://npm.pkg.github.com/@BasisVR" },
"repository":"https://github.com/BasisVR/UpmBuilds"
}
7 changes: 7 additions & 0 deletions msbuild/BouncyCastle/package.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion msbuild/SimpleBase/justfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
git_repo := "https://github.com/ssg/SimpleBase.git"
git_ref := "4.0.2"
dll_name := "SimpleBase.dll"
lib_name := "SimpleBase"
dotnet_framework := "netstandard2.1"
csproj_relative_path := "src" / "SimpleBase.csproj"
out_dir := invocation_directory() / "build"
Expand Down

0 comments on commit 3c8e33b

Please sign in to comment.