Skip to content

Commit

Permalink
chore: refactor release go script to handle output dirs for multiple …
Browse files Browse the repository at this point in the history
…frameworks
  • Loading branch information
pcfreak30 committed Dec 31, 2024
1 parent 24bd251 commit c20fa50
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions scripts/release-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,23 @@ do
# Set up the build directory
mkdir -p go/$APP_NAME/build

# Determine which output directory exists
OUTPUT_DIR=""
if [ -d "apps/$APP_NAME/build/client" ]; then
OUTPUT_DIR="apps/$APP_NAME/build/client"
elif [ -d "apps/$APP_NAME/dist" ]; then
OUTPUT_DIR="apps/$APP_NAME/dist"
else
echo "No client build output found for $APP_NAME"
continue
fi

# Check if there are actual differences before copying
if ! diff -r apps/$APP_NAME/build/client/ go/$APP_NAME/build/ > /dev/null 2>&1; then
if ! diff -r "$OUTPUT_DIR" go/$APP_NAME/build/ > /dev/null 2>&1; then
echo "Changes detected in $APP_NAME build output"
# Remove old files and copy new ones
rm -rf go/$APP_NAME/build/*
cp -R apps/$APP_NAME/build/client/* go/$APP_NAME/build/
cp -R "$OUTPUT_DIR"/* go/$APP_NAME/build/

# Track modified app and its version
modified_apps+=("$APP_NAME")
Expand Down

0 comments on commit c20fa50

Please sign in to comment.