remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/apps/remixdesktop/rundist.bash

25 lines
604 B

6 months ago
#!/bin/bash
# Read the version from package.json
6 months ago
version=$(awk -F'"' '/"version":/ {print $4}' package.json)
6 months ago
# Determine the command to run based on the version
if [[ $version == *"beta"* ]]; then
2 months ago
command="yarn tscbuild -c beta.json"
6 months ago
elif [[ $version == *"alpha"* ]]; then
2 months ago
command="yarn tscbuild -c alpha.json"
6 months ago
elif [[ $version == *"insiders"* ]]; then
2 months ago
command="yarn tscbuild -c insiders.json"
6 months ago
else
2 months ago
command="yarn tscbuild -c latest.json"
6 months ago
fi
# Append any arguments passed in CLI
for arg in "$@"; do
command+=" $arg"
done
# Print and run the command
echo "Running command: $command"
$command