chore: prepare v0.1.0 release with correct image tags

This commit is contained in:
2026-03-31 16:35:18 -07:00
parent 779f9f4e7c
commit 921f5962c2
5 changed files with 67 additions and 5 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
services: services:
app: app:
image: dhg.lol:5000/euchre-camp:0.1.0.dev image: dhg.lol:5000/euchre-camp:0.1.0
container_name: euchre-camp container_name: euchre-camp
ports: ports:
- "51193:3000" - "51193:3000"
@@ -28,7 +28,7 @@ services:
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000} - TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
# Version tracking # Version tracking
- IMAGE_VERSION=0.1.0.dev - IMAGE_VERSION=0.1.0
volumes: volumes:
# Persist uploaded files and static content # Persist uploaded files and static content
+1 -1
View File
@@ -28,7 +28,7 @@ services:
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000} - TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
# Version tracking # Version tracking
- IMAGE_VERSION=0.1.0.dev-dev - IMAGE_VERSION=0.1.0
volumes: volumes:
# Mount source code for hot reload # Mount source code for hot reload
+2 -2
View File
@@ -3,7 +3,7 @@
services: services:
app: app:
image: dhg.lol:5000/euchre-camp:0.1.0.dev image: dhg.lol:5000/euchre-camp:0.1.0
container_name: euchre-camp-app container_name: euchre-camp-app
ports: ports:
- "3000:3000" - "3000:3000"
@@ -24,7 +24,7 @@ services:
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000} - TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
# Version tracking # Version tracking
- IMAGE_VERSION=0.1.0.dev - IMAGE_VERSION=0.1.0
depends_on: depends_on:
- db - db
+1
View File
@@ -20,6 +20,7 @@
"docker:build": "docker-compose build", "docker:build": "docker-compose build",
"docker:shell": "docker exec -it euchre-camp-app sh", "docker:shell": "docker exec -it euchre-camp-app sh",
"version": "node scripts/bump-version.js", "version": "node scripts/bump-version.js",
"set-version": "node scripts/set-version.js",
"version:patch": "node scripts/bump-version.js patch", "version:patch": "node scripts/bump-version.js patch",
"version:minor": "node scripts/bump-version.js minor", "version:minor": "node scripts/bump-version.js minor",
"version:major": "node scripts/bump-version.js major", "version:major": "node scripts/bump-version.js major",
+61
View File
@@ -0,0 +1,61 @@
#!/usr/bin/env node
/**
* Set Version Script
*
* Sets the version in package.json and regenerates docker-compose files
* with the specified version tag.
*/
const { execSync } = require('child_process');
const fs = require('fs');
const path = require('path');
// Parse command line arguments
const args = process.argv.slice(2);
const version = args[0];
if (!version) {
console.error('❌ Error: Version argument required');
console.error('Usage: node scripts/set-version.js <version>');
console.error('Example: node scripts/set-version.js 0.1.0');
process.exit(1);
}
// Validate version format
const versionRegex = /^\d+\.\d+\.\d+$/;
if (!versionRegex.test(version)) {
console.error(`❌ Error: Invalid version format "${version}"`);
console.error('Version must be in format: MAJOR.MINOR.PATCH (e.g., 0.1.0)');
process.exit(1);
}
// Paths
const packageJsonPath = path.join(__dirname, '..', 'package.json');
// Update package.json version
function updatePackageJson(newVersion) {
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
packageJson.version = newVersion;
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
console.log(`✓ Updated package.json to version ${newVersion}`);
}
// Main function
function main() {
console.log(`🔄 Setting version to ${version}\n`);
// Update package.json
updatePackageJson(version);
console.log(`\n✅ Version set to ${version}`);
console.log(`\nNext steps:`);
console.log(` 1. Review changes: git diff`);
console.log(` 2. Commit changes: git commit -am "chore: set version to ${version}"`);
console.log(` 3. Create tag: git tag -a v${version} -m "Release v${version}"`);
console.log(` 4. Generate docker-compose files: npm run docker:compose:generate`);
console.log(` 5. Build and push Docker images: npm run docker:build:push`);
}
// Run main function
main();