Skip to content

Commit 501f79c

Browse files
committed
chore: misc script updates
1 parent a9ce78e commit 501f79c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Tools/DevInstall.nu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
use Package.nu package-plugin
22

33
def main [--ue-install-dir: string] {
4-
let info = package-plugin --ue-install-dir $ue_install_dir;
4+
let info = package-plugin --ue-install-dir $ue_install_dir --keep-binaries;
55
let engine_plugins_dir = [$info.ue_install, "Engine", "Plugins", "Marketplace"] | path join;
66
let plugin_extract_dir = [$engine_plugins_dir, $info.plugin_name] | path join;
77

88
print $"Extracting ($info.plugin_name) to ($plugin_extract_dir)";
9+
rm -rf $plugin_extract_dir;
910
mkdir $plugin_extract_dir;
1011
tar -xf $info.plugin_archive -C $plugin_extract_dir;
1112
print $"(ansi green)Unreal ($info.plugin_name) successfully installed to ($engine_plugins_dir)(ansi reset)";

Tools/Package.nu

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def ue-tool-extension [] {
2929
}
3030
}
3131

32-
export def package-plugin [--ue-install-dir: string] {
32+
export def package-plugin [--ue-install-dir: string, --keep-binaries] {
3333
let install_dirs = if $ue_install_dir != null { [$ue_install_dir] } else { get-ue-install-dirs };
3434
let plugin_dir = $env.FILE_PWD | path join '..' | path expand;
3535
let dist_dir = [$plugin_dir, 'Dist'] | path join;
@@ -86,7 +86,11 @@ export def package-plugin [--ue-install-dir: string] {
8686

8787
if $uat_exit_code == 0 {
8888
print $"(ansi cyan)Creating archive ($dist_archive) from ($temp_package_dir)(ansi reset)";
89-
tar -a -cf $dist_archive -C $temp_package_dir --exclude "Binaries" --exclude "Intermediate" --exclude "Tools" '*';
89+
if $keep_binaries {
90+
tar -a -cf $dist_archive -C $temp_package_dir --exclude "Tools" '*';
91+
} else {
92+
tar -a -cf $dist_archive -C $temp_package_dir --exclude "Binaries" --exclude "Intermediate" --exclude "Tools" '*';
93+
}
9094
rm -rf $temp_package_dir;
9195
}
9296

0 commit comments

Comments
 (0)