Files
zeekay d6423729c2 Complete rebrand from ComfyUI to Hanzo Studio
- Replace all ComfyUI references with Hanzo Studio
- Update comfy.org URLs to hanzo.ai/studio.hanzo.ai
- Change comfyanonymous to hanzoai
- Update Comfy-Org to hanzo-studio
- Rename files and directories
- Update package names and configurations
- Update documentation and README files

This is a comprehensive rebranding to align with Hanzo AI's
product suite and company identity.
2025-11-23 20:50:10 -08:00

46 lines
1.8 KiB
JavaScript

import { execSync } from 'node:child_process';
import { writeFileSync } from 'node:fs';
import packageJson from './getPackage.js';
try {
// Create a new branch with version-bump prefix
console.log('Creating new branch...');
const date = new Date();
const isoDate = date.toISOString().split('T')[0];
const timestamp = date.getTime();
const branchName = `version-bump-${isoDate}-${timestamp}`;
execSync(`git checkout -b ${branchName} -t origin/main`, { stdio: 'inherit' });
// Get latest frontend release: https://github.com/hanzo-studio/studio-frontend/releases
const latestRelease = 'https://api.github.com/repos/hanzo-studio/studio-frontend/releases/latest';
const latestReleaseData = await fetch(latestRelease);
/** @type {unknown} */
const json = await latestReleaseData.json();
if (!('tag_name' in json) || typeof json.tag_name !== 'string') {
throw new Error('Invalid response from GitHub');
}
const latestReleaseTag = json.tag_name;
const version = latestReleaseTag.replace('v', '');
// Update frontend version in package.json
packageJson.config.frontendVersion = version;
writeFileSync('./package.json', JSON.stringify(packageJson, null, 2));
// Messaging
const message = `[chore] Update frontend to ${version}`;
const prBody = `Automated frontend update to ${version}: https://github.com/hanzo-studio/studio-frontend/releases/tag/v${version}`;
// Commit the version bump
execSync(`git commit -am "${message}" --no-verify`, { stdio: 'inherit' });
// Create the PR
console.log('Creating PR...');
execSync(`gh pr create --title "${message}" --label "dependencies" --body "${prBody}"`, { stdio: 'inherit' });
console.log(`✅ Successfully created PR for frontend ${version}`);
} catch (error) {
console.error('❌ Error during release process:', error.message);
}