Skip to content

Commit d62e381

Browse files
committed
chore: add release script
1 parent 1267966 commit d62e381

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

Ecsact.uplugin

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
"Installed": true,
1717
"EngineVersion": "5.5.0",
1818
"EnabledByDefault": false,
19+
"ExcludeDirectories": [
20+
"Tools"
21+
],
1922
"Modules":
2023
[
2124
{
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../Dist

Tools/EcsactUnrealCodegen/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@aspect_bazel_lib//lib:transitions.bzl", "platform_transition_filegroup")
22
load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
3+
load("@bzlws//rules:bzlws_copy.bzl", "bzlws_copy")
34
load("@rules_cc//cc:defs.bzl", "cc_binary")
45

56
package(default_visibility = ["//visibility:public"])
@@ -75,3 +76,9 @@ filegroup(
7576
name = "AllPlatforms",
7677
srcs = [":copy_EcsactUnrealCodegen-{}".format(platform.split(":")[1]) for platform in PLATFORMS],
7778
)
79+
80+
bzlws_copy(
81+
name = "CopyDist",
82+
srcs = [":AllPlatforms"],
83+
out = "../../Dist/{FILENAME}",
84+
)

Tools/EcsactUnrealCodegen/MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ bazel_dep(name = "platforms", version = "0.0.11")
77
bazel_dep(name = "bazel_skylib", version = "1.7.1")
88
bazel_dep(name = "boost.program_options", version = "1.83.0.bcr.2")
99
bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.1")
10+
bazel_dep(name = "bzlws", version = "0.2.0")
1011

1112
zig_toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")
1213
use_repo(zig_toolchains, "zig_sdk")

Tools/Release.nu

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
use Package.nu package-plugin
2+
3+
def main [version: string] {
4+
let plugin_dir = $env.FILE_PWD | path join '..' | path expand;
5+
let dist_dir = [$plugin_dir, 'Dist'] | path join;
6+
rm -rf $dist_dir;
7+
mkdir $dist_dir;
8+
let ecsact_unreal_codegen_dir = $env.FILE_PWD | path join 'EcsactUnrealCodegen' | path expand;
9+
10+
cd $plugin_dir;
11+
let plugin_descriptor_filename = (ls *.uplugin).0.name;
12+
let plugin_name = $plugin_descriptor_filename | split row ".uplugin" | get 0;
13+
14+
mut plugin_descriptor = open $plugin_descriptor_filename | from json;
15+
$plugin_descriptor.Version += 1;
16+
$plugin_descriptor.VersionName = $version;
17+
$plugin_descriptor | to json -t 1 | save $plugin_descriptor_filename;
18+
19+
cd $ecsact_unreal_codegen_dir;
20+
^bazel run //:CopyDist;
21+
cd $plugin_dir;
22+
package-plugin;
23+
24+
ls $dist_dir;
25+
26+
gh release create $version --generate-notes --latest -t $version "./Dist/*";
27+
}

0 commit comments

Comments
 (0)