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
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user