feat(release): prepare 1.1.0 candidate

This commit is contained in:
Yun Chan 2026-08-29 18:33:45 +09:00
parent 5a34f66981
commit 5205dcdfa9
736 changed files with 115667 additions and 12203 deletions

View file

@ -1,56 +1,40 @@
// scripts/ci/push-to-chanpaca-git.mjs
// Pushes the monorepo to the user's git.chanpaca.net remote repository
// Pushes the current checked-out commit to a pre-authorized Chanpaca remote.
// Credentials must come from Git Credential Manager or CI's GIT_ASKPASS; they
// are never embedded in a URL, command argument, or repository file.
import { spawnSync } from 'node:child_process'
import { spawnSync } from 'node:child_process';
import { readFileSync, existsSync } from 'node:fs';
let user = 'yunchan';
let pass = 'ONVI2v4J#y';
let repo = 'd3ro-voice';
if (existsSync('.env')) {
const envContent = readFileSync('.env', 'utf8');
for (const line of envContent.split('\n')) {
const trimmed = line.trim();
if (trimmed.startsWith('GIT_USERNAME=')) user = trimmed.split('=')[1].trim();
if (trimmed.startsWith('GIT_PASSWORD=')) pass = trimmed.split('=')[1].trim();
if (trimmed.startsWith('GIT_REPO_NAME=')) repo = trimmed.split('=')[1].trim();
}
function requireEnvironment(name) {
const value = process.env[name]?.trim()
if (!value) throw new Error(`${name} is required`)
return value
}
const encodedPass = encodeURIComponent(pass);
const remoteUrl = `https://${user}:${encodedPass}@git.chanpaca.net/${user}/${repo}.git`;
const user = requireEnvironment('GIT_USERNAME')
const repo = requireEnvironment('GIT_REPO_NAME')
const server = (process.env.GIT_SERVER_URL?.trim() || 'https://git.chanpaca.net')
.replace(/\/$/, '')
const remoteUrl = `${server}/${encodeURIComponent(user)}/${encodeURIComponent(repo)}.git`
function run(cmd, args) {
console.log(`▶ Running: ${cmd} ${args.join(' ')}`);
const res = spawnSync(cmd, args, { stdio: 'inherit', shell: process.platform === 'win32' });
if (res.status !== 0) {
console.error(`Command failed with status ${res.status}`);
}
return res.status === 0;
function run(args) {
const result = spawnSync('git', args, {
stdio: 'inherit',
shell: false,
env: process.env,
})
if (result.status !== 0) throw new Error(`git ${args[0]} failed`)
}
console.log('--- Configuring Git Remote for git.chanpaca.net ---');
// Check if chanpaca remote exists
const remoteCheck = spawnSync('git', ['remote', 'get-url', 'chanpaca'], { encoding: 'utf8' });
const remoteCheck = spawnSync('git', ['remote', 'get-url', 'chanpaca'], {
encoding: 'utf8',
shell: false,
})
if (remoteCheck.status === 0) {
run('git', ['remote', 'set-url', 'chanpaca', remoteUrl]);
run(['remote', 'set-url', 'chanpaca', remoteUrl])
} else {
run('git', ['remote', 'add', 'chanpaca', remoteUrl]);
run(['remote', 'add', 'chanpaca', remoteUrl])
}
console.log('\n--- Staging and committing all changes ---');
run('git', ['add', '-A']);
run('git', ['commit', '-m', 'feat: add 10+ ad networks mediation, full CI/CD workflows, admin CRM, and production packaging']);
console.log('\n--- Pushing to git.chanpaca.net (main & tags) ---');
const pushMain = run('git', ['push', '-u', 'chanpaca', 'HEAD:main', '--force']);
const pushTags = run('git', ['push', 'chanpaca', '--tags']);
if (pushMain) {
console.log('\n🎉 Successfully pushed full codebase to https://git.chanpaca.net/' + user + '/' + repo);
} else {
console.error('\n❌ Push to git.chanpaca.net failed.');
process.exit(1);
}
// The caller owns staging and commit creation. Force push is intentionally not
// supported by this helper.
run(['push', '-u', 'chanpaca', 'HEAD:main'])
if (process.argv.includes('--tags')) run(['push', 'chanpaca', '--tags'])