jan/.github/scripts/rename-workspace.sh
hiento09 1ad897782c
feat: new nightly app channel (#3948)
Co-authored-by: Hien To <tominhhien97@gmail.com>
2024-11-05 19:40:19 +07:00

18 lines
350 B
Bash

#!/bin/bash
# File path to be modified
FILE_PATH="$1"
CHANNEL="$2"
# Check if the file exists
if [ ! -f "$FILE_PATH" ]; then
echo "File does not exist: $FILE_PATH"
exit 1
fi
# Perform the replacements
sed -i -e "s/yarn workspace jan/yarn workspace jan-$CHANNEL/g" "$FILE_PATH"
# Notify completion
echo "File has been updated: $FILE_PATH"