Skip to content

Commit 53ab828

Browse files
authored
fix: use plugin-version parameter for proto plugin packaging (#234)
The PackageProtoPlugin target was incorrectly using the Morphir Version property instead of a dedicated plugin version parameter. This caused the tarball to be created with the wrong version number (0.3.0-rc.1 instead of 0.1.0). Changes: - Add PluginVersion parameter to Build.ProtoPlugin.cs - Update PackageProtoPlugin to use PluginVersion instead of Version - Update workflow to pass --plugin-version instead of --version 🤖 Generated with Claude Code
1 parent d561941 commit 53ab828

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/proto-plugin-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: ./build.sh --target BuildProtoPlugin
6969

7070
- name: Package Proto Plugin
71-
run: ./build.sh --target PackageProtoPlugin --version ${{ env.PLUGIN_VERSION }}
71+
run: ./build.sh --target PackageProtoPlugin --plugin-version ${{ env.PLUGIN_VERSION }}
7272

7373
- name: Upload Plugin Artifact
7474
uses: actions/upload-artifact@v4

build/Build.ProtoPlugin.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ partial class Build
1616
[Parameter("Output directory for proto plugin WASM")]
1717
readonly AbsolutePath ProtoPluginDir = RootDirectory / "artifacts" / "proto-plugin";
1818

19+
[Parameter("Version for the proto plugin release (e.g., 0.1.0)")]
20+
readonly string PluginVersion;
21+
1922
AbsolutePath ProtoPluginProjectDir => RootDirectory / "integrations" / "rust" / "morphir-wasm-proto-plugin";
2023

2124
/// <summary>
@@ -116,9 +119,10 @@ partial class Build
116119
{
117120
Serilog.Log.Information("Packaging Proto WASM plugin...");
118121

122+
var pluginVer = PluginVersion ?? throw new Exception("PluginVersion parameter is required for PackageProtoPlugin target");
119123
var wasmFile = ProtoPluginDir / "morphir_plugin.wasm";
120124
var readmeFile = ProtoPluginProjectDir / "README.md";
121-
var tarballName = $"morphir-proto-plugin-v{Version}.tar.gz";
125+
var tarballName = $"morphir-proto-plugin-v{pluginVer}.tar.gz";
122126
var tarballPath = ProtoPluginDir / tarballName;
123127

124128
// Create a staging directory for the tarball contents

0 commit comments

Comments
 (0)