1 Commits

Author SHA1 Message Date
e22b3c82a2 Fix Docker build version detection
- Skip prebuild step in Docker when VERSION build arg is provided
- Prevent version-check.js from overwriting pre-generated version.js in Docker
- Fix Docker containers showing incorrect '-dev' suffix for release builds
- Use direct react-scripts build when version is pre-generated
2026-01-21 22:06:37 +01:00
2 changed files with 9 additions and 3 deletions

View File

@@ -31,8 +31,14 @@ RUN if [ -n "$VERSION" ]; then \
echo "📝 Generated version.js with VERSION=$VERSION, IS_RELEASE=$IS_RELEASE"; \
fi
# Build the application
RUN npm run build
# Build the application (skip prebuild if we already generated version.js)
RUN if [ -n "$VERSION" ]; then \
echo "🚀 Building with pre-generated version.js" && \
npx react-scripts build; \
else \
echo "🚀 Building with version-check.js" && \
npm run build; \
fi
# Production stage
FROM node:24-alpine AS production

View File

@@ -1,6 +1,6 @@
{
"name": "jmespath-playground",
"version": "1.1.5",
"version": "1.1.6",
"description": "A React-based web application for testing JMESPath expressions against JSON data",
"main": "index.js",
"scripts": {