Skip to content

feat: sdk 0.9.0 release prep #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ common --registry=https://raw.githubusercontent.com/ecsact-dev/bazel_registry/ma
common --registry=https://raw.githubusercontent.com/zaucy/bazel-central-registry/add-curl-config2 # temporary
common --registry=https://raw.githubusercontent.com/bazelboost/registry/main
common --registry=https://bcr.bazel.build
common --@docopt.cpp//:use_boost_regex
build --enable_platform_specific_config
build --incompatible_enable_cc_toolchain_resolution
build --incompatible_strict_action_env
Expand Down
12 changes: 8 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
root = true

[*]
end_of_line = lf
root = true

[*]
end_of_line = lf

[release-notes-template]
indent_style = space
indent_size = 4
12 changes: 10 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ bzlws_copy(
srcs = [
"@ecsact_cli",
"@ecsact_lsp_server",
],
] + select({
"@platforms//os:windows": [
"@ecsact_unreal_codegen_win64//file",
],
"@platforms//os:linux": [
"@ecsact_unreal_codegen_linux//file",
],
}),
out = "dist/bin/{FILENAME}",
force = True,
)
Expand All @@ -24,9 +31,9 @@ bzlws_copy(
bzlws_copy(
name = "copy_dist_include",
srcs = [
"@ecsact_codegen//:headers",
"@ecsact_lang_cpp//:headers",
"@ecsact_runtime//:headers",
"@ecsact_codegen//:headers",
],
out = "dist/include/{FILEPATH}",
force = True,
Expand Down Expand Up @@ -60,6 +67,7 @@ bzlws_copy(
"@ecsact_rt_entt",
"@ecsact_rt_reference//async_reference",
"@ecsact_rt_reference//serialize_reference",
"@ecsact_si_wasmer",
],
out = "dist/share/ecsact/recipes/{FILENAME}",
force = True,
Expand Down
1 change: 1 addition & 0 deletions CheckDist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ echo
[ ! -d "dist/include/ecsact" ] && echo "Missing ecsact include directory" && exit 1
[ ! -f "dist/bin/ecsact" ] && echo "Missing ecsact CLI" && exit 1
[ ! -f "dist/bin/ecsact_lsp_server" ] && echo "Missing ecsact lsp CLI" && exit 1
[ ! -f "dist/bin/EcsactUnrealCodegen" ] && echo "Missing EcsatUnrealCodegen tool" && exit 1

exit 0
3 changes: 2 additions & 1 deletion CreateMsix.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ try

$ExecutablesToSign = @(
'.\dist\bin\ecsact.exe',
'.\dist\bin\ecsact_lsp_server.exe'
'.\dist\bin\ecsact_lsp_server.exe',
'.\dist\bin\EcsactUnrealCodegen.exe'
)

foreach($Executable in $ExecutablesToSign)
Expand Down
45 changes: 29 additions & 16 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
module(name = "ecsact_sdk")

bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_cc", version = "0.0.17")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_pkg", version = "0.10.1")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "ecsact_si_wasm", version = "0.1.2")
bazel_dep(name = "rules_ecsact", version = "0.5.5")
bazel_dep(name = "ecsact_rt_entt", version = "0.3.7")
bazel_dep(name = "ecsact_rt_reference", version = "0.1.1")
bazel_dep(name = "ecsact_codegen", version = "0.4.1")
bazel_dep(name = "ecsact_parse", version = "0.5.1")
bazel_dep(name = "ecsact_runtime", version = "0.6.7")
bazel_dep(name = "ecsact_interpret", version = "0.6.4")
bazel_dep(name = "ecsact_lang_cpp", version = "0.4.6")
bazel_dep(name = "ecsact_cli", version = "0.3.16")
bazel_dep(name = "ecsact_lsp_server", version = "0.2.1")
bazel_dep(name = "ecsact_lang_json", version = "0.1.5")
bazel_dep(name = "ecsact_lang_csharp", version = "0.1.5")

# NOTE: this si the first ecsact dependency and if you see a bazel 'compatibility' error it may _NOT_ be from this one and could be from many others.
# SEE: https://github.com/bazelbuild/bazel/issues/22972
bazel_dep(name = "ecsact_si_wasmer", version = "0.2.0")
bazel_dep(name = "rules_ecsact", version = "0.5.10")
bazel_dep(name = "ecsact_rt_entt", version = "0.3.19")
bazel_dep(name = "ecsact_rt_reference", version = "0.2.0")
bazel_dep(name = "ecsact_codegen", version = "0.4.4")
bazel_dep(name = "ecsact_parse", version = "0.5.5")
bazel_dep(name = "ecsact_runtime", version = "0.8.2")
bazel_dep(name = "ecsact_interpret", version = "0.6.7")
bazel_dep(name = "ecsact_lang_cpp", version = "0.4.11")
bazel_dep(name = "ecsact_cli", version = "0.3.26")
bazel_dep(name = "ecsact_lsp_server", version = "0.2.3")
bazel_dep(name = "ecsact_lang_json", version = "0.1.7")
bazel_dep(name = "ecsact_lang_csharp", version = "0.1.7")
bazel_dep(name = "yaml-cpp", version = "0.8.0")
bazel_dep(name = "boost.dll", version = "1.83.0.bzl.2")
bazel_dep(name = "boost.process", version = "1.83.0.bzl.2")
bazel_dep(name = "bzlws", version = "0.2.0")
bazel_dep(name = "ecsact_logo", version = "0.1.11")

bazel_dep(name = "toolchains_llvm", version = "1.0.0", dev_dependency = True)
prebuilt_tools = use_extension("//:prebuilt-tools.bzl", "prebuilt_tools")
use_repo(
prebuilt_tools,
"ecsact_unreal_codegen_linux",
"ecsact_unreal_codegen_win64",
)

bazel_dep(name = "toolchains_llvm", version = "1.2.0", dev_dependency = True)
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)

bazel_dep(name = "docopt.cpp", version = "0.6.2")

git_override(
module_name = "hedron_compile_commands",
commit = "204aa593e002cbd177d30f11f54cff3559110bb9",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Here are some core repositories that are most interesting if you're considering
* https://github.com/ecsact-dev/ecsact_interpret
* https://github.com/ecsact-dev/ecsact_cli
* https://github.com/ecsact-dev/ecsact_rt_entt
* https://github.com/ecsact-dev/ecsact_si_wasm
* https://github.com/ecsact-dev/ecsact_si_wasmer
11 changes: 11 additions & 0 deletions dist/AppxManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@
</Extensions>
</Application>

<Application Id="EcsactSdk.EcsactUnrealCodegen" Executable="bin/EcsactUnrealCodegen.exe" EntryPoint="Windows.FullTrustApplication">
<uap3:VisualElements DisplayName="Ecsact Unreal Codegen" Description="Tool for executing ecsact codegen on Unreal projects" BackgroundColor="transparent" Square44x44Logo="images/ecsact-color44.png" Square150x150Logo="images/ecsact-color150.png" AppListEntry="none" VisualGroup="Ecsact" />
<Extensions>
<uap3:Extension Category="windows.appExecutionAlias">
<uap3:AppExecutionAlias>
<uap8:ExecutionAlias Alias="EcsactUnrealCodegen.exe" />
</uap3:AppExecutionAlias>
</uap3:Extension>
</Extensions>
</Application>

</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
Expand Down
21 changes: 21 additions & 0 deletions prebuilt-tools.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")

ECSACT_UNREAL_VERSION = "0.2.2"

def _prebuilt_tools(mctx):
http_file(
name = "ecsact_unreal_codegen_win64",
downloaded_file_path = "EcsactUnrealCodegen.exe",
executable = True,
url = "https://github.com/ecsact-dev/ecsact_unreal/releases/download/{}/EcsactUnrealCodegen-Win64.exe".format(ECSACT_UNREAL_VERSION),
integrity = "sha256-ynFQTRdnN4k7s3t2Z3dJ2fnxoQ8hV/P5y2cvgRMvxSg=",
)
http_file(
name = "ecsact_unreal_codegen_linux",
downloaded_file_path = "EcsactUnrealCodegen",
executable = True,
url = "https://github.com/ecsact-dev/ecsact_unreal/releases/download/{}/EcsactUnrealCodegen-Linux".format(ECSACT_UNREAL_VERSION),
integrity = "sha256-nwcXevEQn1RJrm/7/Nq+HtR3nBLMbhlovfPSgXR923A=",
)

prebuilt_tools = module_extension(_prebuilt_tools)
76 changes: 41 additions & 35 deletions release-notes-template
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
{% if version.tag -%}
## [{{ version.tag }}]({{repository_url}}/releases/tag/{{ version.tag }})
{% else -%}
{% set from = commits | last -%}
{% set to = version.id-%}
{% set from_shorthand = from.id | truncate(length=7, end="") -%}
{% set to_shorthand = to | truncate(length=7, end="") -%}
## Unreleased ({{ from_shorthand ~ ".." ~ to_shorthand }})
{% endif -%}

{% for type, typed_commits in commits | sort(attribute="type")| group_by(attribute="type")-%}
#### {{ type | upper_first }}
{% for scope, scoped_commits in typed_commits | group_by(attribute="scope") -%}

{% for commit in scoped_commits | sort(attribute="scope") -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
- **({{ scope }})** {{ commit.summary }} - ([{{ shorthand }}]({{ repository_url }}/commit/{{ commit.id }}))
{{ commit.body }}
{% endfor -%}

{% endfor -%}

{%- for commit in typed_commits | unscoped -%}
{% if commit.author -%}
{% set author = commit.author -%}
{% else -%}
{% set author = commit.signature -%}
{% endif -%}

{% set shorthand = commit.id | truncate(length=7, end="") -%}
- {{ commit.summary }} - ([{{ shorthand }}]({{ repository_url }}/commit/{{ commit.id }}))
{{ commit.body }}
{% endfor -%}

{% endfor -%}
{% if version.tag -%}
## [{{ version.tag }}]({{repository_url}}/releases/tag/{{ version.tag }})
{% else -%}
{% set from = commits | last -%}
{% set to = version.id-%}
{% set from_shorthand = from.id | truncate(length=7, end="") -%}
{% set to_shorthand = to | truncate(length=7, end="") -%}
## Unreleased ({{ from_shorthand ~ ".." ~ to_shorthand }})
{% endif -%}

{% for type, typed_commits in commits | sort(attribute="type") | group_by(attribute="type") -%}
{% if type != "Miscellaneous Chores" -%}
#### {{ type | upper_first }}
{% endif -%}
{% for scope, scoped_commits in typed_commits | group_by(attribute="scope") -%}

{% for commit in scoped_commits | sort(attribute="scope") -%}
{% if commit.type != "Miscellaneous Chores" -%}
{% set shorthand = commit.id | truncate(length=7, end="") -%}
- **({{ scope }})** {{ commit.summary }} - ([{{ shorthand }}]({{ repository_url }}/commit/{{ commit.id }}))
{{ commit.body }}
{% endif -%}
{% endfor -%}

{% endfor -%}

{%- for commit in typed_commits | unscoped -%}
{% if commit.type != "Miscellaneous Chores" -%}
{% if commit.author -%}
{% set author = commit.author -%}
{% else -%}
{% set author = commit.signature -%}
{% endif -%}

{% set shorthand = commit.id | truncate(length=7, end="") -%}
- {{ commit.summary }} - ([{{ shorthand }}]({{ repository_url }}/commit/{{ commit.id }}))
{{ commit.body }}
{% endif -%}
{% endfor -%}

{% endfor -%}
31 changes: 23 additions & 8 deletions release.nu
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,31 @@ def get-ecsact-deps [] {
)
}

def main [version: string, --dry-run] {
def main [version, --dry-run, --update] {
let start_dir = $env.PWD;
let tmp_repo_dir = mktemp -d --suffix "EcsactSdkRelease";
let last_release = (gh release view --json tagName | from json).tagName;
git worktree add $tmp_repo_dir $last_release;
cd $tmp_repo_dir;
let before_update_deps = get-ecsact-deps;
git worktree remove $tmp_repo_dir --force | complete; # this sometimes fails
cd $start_dir;
let changelog_template = [$start_dir, "release-notes-template"] | path join;

$before_update_deps | each {|dep| bzlmod add $dep.name; };

if $update {
$before_update_deps | each {|dep| bzlmod add $dep.name; };
}

# sanity check
bazel build //...;
bazel build "//...";

let release_notes = (get-ecsact-deps | each {|dep|
let before_version = $before_update_deps | where name == $dep.name | get version | get 0;
print $"Generating release notes for ($dep.name)";
let before_version = ($before_update_deps | where name == $dep.name);
if ($before_version | length) == 0 {
return $"## NEW dependency ($dep.name)\n\n";
}
let before_version = $before_version | get version | get 0;
let after_version = $dep | get version;
let dep_repo_remote = $"https://github.com/ecsact-dev/($dep.name)";
let cached_repo_dir = $".cache/repos/($dep.name)";
Expand All @@ -43,9 +56,11 @@ def main [version: string, --dry-run] {
if $dry_run {
echo $release_notes;
} else {
git add MODULE.bazel;
git commit -m $"chore\(deps\): ecsact repos for ($version) release";
git push origin main;
if $update {
git add MODULE.bazel;
git commit -m $"chore\(deps\): ecsact repos for ($version) release";
git push origin main;
}
git tag $version;
git push origin $version;
gh release create $version -n $release_notes --latest -t $version --verify-tag --latest;
Expand Down