From 73236dfbb7b111ba57906259a4f78e6778919e34 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Wed, 18 Sep 2024 07:28:48 +0200 Subject: [PATCH] rundist --- apps/remixdesktop/rundist.bash | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) mode change 120000 => 100755 apps/remixdesktop/rundist.bash diff --git a/apps/remixdesktop/rundist.bash b/apps/remixdesktop/rundist.bash deleted file mode 120000 index 7139f5e09c..0000000000 --- a/apps/remixdesktop/rundist.bash +++ /dev/null @@ -1 +0,0 @@ -rundist_webpack.bash \ No newline at end of file diff --git a/apps/remixdesktop/rundist.bash b/apps/remixdesktop/rundist.bash new file mode 100755 index 0000000000..66a3a9a0dc --- /dev/null +++ b/apps/remixdesktop/rundist.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +# Read the version from package.json +version=$(awk -F'"' '/"version":/ {print $4}' package.json) + +# Determine the command to run based on the version +if [[ $version == *"beta"* ]]; then + command="yarn dist -c beta.json" +elif [[ $version == *"alpha"* ]]; then + command="yarn dist -c alpha.json" +elif [[ $version == *"insiders"* ]]; then + command="yarn dist -c insiders.json" +else + command="yarn dist -c latest.json" +fi + +# Append any arguments passed in CLI +for arg in "$@"; do + command+=" $arg" +done + +# Print and run the command +echo "Running command: $command" +$command