chore: prepare v0.1.0 release with correct image tags
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
services:
|
||||
app:
|
||||
image: dhg.lol:5000/euchre-camp:0.1.0.dev
|
||||
image: dhg.lol:5000/euchre-camp:0.1.0
|
||||
container_name: euchre-camp
|
||||
ports:
|
||||
- "51193:3000"
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
|
||||
|
||||
# Version tracking
|
||||
- IMAGE_VERSION=0.1.0.dev
|
||||
- IMAGE_VERSION=0.1.0
|
||||
|
||||
volumes:
|
||||
# Persist uploaded files and static content
|
||||
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
|
||||
|
||||
# Version tracking
|
||||
- IMAGE_VERSION=0.1.0.dev-dev
|
||||
- IMAGE_VERSION=0.1.0
|
||||
|
||||
volumes:
|
||||
# Mount source code for hot reload
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
|
||||
services:
|
||||
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
|
||||
ports:
|
||||
- "3000:3000"
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
|
||||
|
||||
# Version tracking
|
||||
- IMAGE_VERSION=0.1.0.dev
|
||||
- IMAGE_VERSION=0.1.0
|
||||
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"docker:build": "docker-compose build",
|
||||
"docker:shell": "docker exec -it euchre-camp-app sh",
|
||||
"version": "node scripts/bump-version.js",
|
||||
"set-version": "node scripts/set-version.js",
|
||||
"version:patch": "node scripts/bump-version.js patch",
|
||||
"version:minor": "node scripts/bump-version.js minor",
|
||||
"version:major": "node scripts/bump-version.js major",
|
||||
|
||||
Executable
+61
@@ -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();
|
||||
Reference in New Issue
Block a user