fix: build-release script and remaining build errors
Remove --ignore-scripts from npm install (better-sqlite3 needs native build). Add tar.gz fallback when zip is not available. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3a54ba40d3
commit
14445a092c
1 changed files with 12 additions and 5 deletions
|
|
@ -41,7 +41,7 @@ cp "${PROJECT_DIR}/OPSÆTNING.md" "${RELEASE_DIR}/"
|
|||
echo ""
|
||||
echo "Installing dependencies..."
|
||||
cd "${RELEASE_DIR}"
|
||||
npm install --ignore-scripts 2>&1 | tail -1
|
||||
npm install 2>&1 | tail -1
|
||||
|
||||
echo "Verifying build..."
|
||||
npm run build 2>&1 | tail -3
|
||||
|
|
@ -52,11 +52,18 @@ echo "Cleaning up..."
|
|||
rm -rf "${RELEASE_DIR}/node_modules"
|
||||
rm -rf "${RELEASE_DIR}/.next"
|
||||
|
||||
# Create zip
|
||||
# Create archive
|
||||
cd /tmp
|
||||
if command -v zip &> /dev/null; then
|
||||
zip -rq "${ZIP_NAME}" "foamking-release-${TIMESTAMP}"
|
||||
ARCHIVE="/tmp/${ZIP_NAME}"
|
||||
else
|
||||
TAR_NAME="foamking-beregner-${DATE}.tar.gz"
|
||||
tar -czf "${TAR_NAME}" "foamking-release-${TIMESTAMP}"
|
||||
ARCHIVE="/tmp/${TAR_NAME}"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Release built successfully!"
|
||||
echo "Zip: /tmp/${ZIP_NAME}"
|
||||
echo "Size: $(du -h "/tmp/${ZIP_NAME}" | cut -f1)"
|
||||
echo "Archive: ${ARCHIVE}"
|
||||
echo "Size: $(du -h "${ARCHIVE}" | cut -f1)"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue