From f34525aa6418c9c45c7b2abb9bbf78c1f13d00a6 Mon Sep 17 00:00:00 2001 From: Matthew Huebert Date: Thu, 16 Jan 2025 14:38:00 -0500 Subject: [PATCH] fix release --- .github/workflows/release.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2048fa6e..0df5edf0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,9 +96,7 @@ jobs: # Convert to npm version format if it's a dev version if [[ $VERSION == *.dev ]]; then - # Extract date and time parts, removing .dev suffix DATE_TIME=$(echo $VERSION | sed 's/\.dev$//') - # Format as 0.0.0-dev.YYYYMMDDHHMMSS NPM_VERSION="0.0.0-dev.$(echo $DATE_TIME | sed 's/\.//g')" else NPM_VERSION=$VERSION @@ -106,18 +104,14 @@ jobs: JSDELIVR_URL="https://cdn.jsdelivr.net/npm/@probcomp/genstudio@${NPM_VERSION}/dist/widget_build.js" - # Create a temporary build directory - mkdir -p build/genstudio - cp -r src/genstudio/* build/genstudio/ - - # Update the widget URL in the build copy - sed -i "s|_esm = WIDGET_URL|_esm = \"${JSDELIVR_URL}\"|" build/genstudio/widget.py + # Update the widget URL in the source + sed -i "s|_esm = WIDGET_URL|_esm = \"${JSDELIVR_URL}\"|" src/genstudio/widget.py - # Build from the modified source - poetry build --source-directory build + # Build with modified source + poetry build - # Clean up - rm -rf build + # Restore the file using git + git checkout src/genstudio/widget.py - name: Deploy to Artifact Registry run: |