Skip to content

Commit

Permalink
ci: fix create zip/tar script syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Jan 22, 2025
1 parent e63bc18 commit a1fc452
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,22 +369,24 @@ jobs:
echo "${{ env.TEMP_STATIC_LIB }} exists"
tar czf "${{ env.TEMP_STATIC_ARCHIVE }}" "${{ env.TEMP_STATIC_LIB }}"
UPLOAD_DIR="./artifacts/upload
env STATIC_ARCHIVE_1 = "/static/${{ matrix.target }}/latest/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}"
env STATIC_ARCHIVE_2 = "/static/${{ matrix.target }}/releases/${{ github.ref_name }}/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}"
env STATIC_ARCHIVE_3 = "/static/${{ matrix.target }}/commits/${{ github.sha }}/${{ matrix.commit-suffix }}.${{ env.EXTENSION }}"
env STATIC_ARCHIVE_GITHUB = "./artifacts/github/lib${{ env.IMAGEFLOW_TAG_SHA_SUFFIX }}-${{ matrix.commit-suffix }}.${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}"
mkdir -p $(dirname $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_1)
mkdir -p $(dirname $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_2)
mkdir -p $(dirname $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_3)
cp $TEMP_STATIC_ARCHIVE $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_1
cp $TEMP_STATIC_ARCHIVE $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_2
cp $TEMP_STATIC_ARCHIVE $STATIC_UPLOAD_DIR$STATIC_ARCHIVE_3
mv $TEMP_STATIC_ARCHIVE $STATIC_ARCHIVE_GITHUB
echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_UPLOAD_DIR$STATIC_ARCHIVE_1"
echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_UPLOAD_DIR$STATIC_ARCHIVE_2"
echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_UPLOAD_DIR$STATIC_ARCHIVE_3"
# Fix: Correct variable assignments and directory creation
UPLOAD_DIR="./artifacts/upload"
STATIC_ARCHIVE_1="/static/${{ matrix.target }}/latest/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}"
STATIC_ARCHIVE_2="/static/${{ matrix.target }}/releases/${{ github.ref_name }}/${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}"
STATIC_ARCHIVE_3="/static/${{ matrix.target }}/commits/${{ github.sha }}/${{ matrix.commit-suffix }}.${{ env.EXTENSION }}"
STATIC_ARCHIVE_GITHUB="./artifacts/github/lib${{ env.IMAGEFLOW_TAG_SHA_SUFFIX }}-${{ matrix.commit-suffix }}.${{ env.LIBIMAGEFLOW_STATIC }}.${{ env.EXTENSION }}"
mkdir -p "$(dirname "$UPLOAD_DIR$STATIC_ARCHIVE_1")"
mkdir -p "$(dirname "$UPLOAD_DIR$STATIC_ARCHIVE_2")"
mkdir -p "$(dirname "$UPLOAD_DIR$STATIC_ARCHIVE_3")"
cp "${{ env.TEMP_STATIC_ARCHIVE }}" "$UPLOAD_DIR$STATIC_ARCHIVE_1"
cp "${{ env.TEMP_STATIC_ARCHIVE }}" "$UPLOAD_DIR$STATIC_ARCHIVE_2"
cp "${{ env.TEMP_STATIC_ARCHIVE }}" "$UPLOAD_DIR$STATIC_ARCHIVE_3"
mv "${{ env.TEMP_STATIC_ARCHIVE }}" "$STATIC_ARCHIVE_GITHUB"
echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_ARCHIVE_1"
echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_ARCHIVE_2"
echo "Uploaded static archive to ${{ env.HTTPS_IMAGEFLOW_NIGHTLIES }}$STATIC_ARCHIVE_3"
echo "RELATIVE_GITHUB_ARCHIVE_STATIC=$STATIC_ARCHIVE_GITHUB" >> $GITHUB_ENV
)
else
Expand Down

0 comments on commit a1fc452

Please sign in to comment.