mirror of
https://gitlab.com/vyla-entertainment/go.git
synced 2026-11-09 13:07:21 -05:00
update
This commit is contained in:
18
release.js
18
release.js
@@ -32,11 +32,21 @@ function incrementVersion() {
|
||||
function gitCommitAndTag(version) {
|
||||
try {
|
||||
execSync('git add package.json src-tauri/tauri.conf.json', { stdio: 'inherit' });
|
||||
try {
|
||||
execSync(`git commit -m "chore: release ${version}"`, { stdio: 'inherit' });
|
||||
} catch (_) {
|
||||
console.log('Working tree clean, skipping commit.');
|
||||
}
|
||||
|
||||
try {
|
||||
execSync(`git tag -a ${version} -m "Release ${version}"`, { stdio: 'inherit' });
|
||||
} catch (_) {
|
||||
console.log(`Tag ${version} already exists locally.`);
|
||||
}
|
||||
|
||||
execSync('git push origin HEAD --tags', { stdio: 'inherit' });
|
||||
} catch (e) {
|
||||
console.warn('Git operations failed (non-fatal):', e.message);
|
||||
console.warn('Git push failed (will fallback to GitLab API ref):', e.message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,6 +104,11 @@ async function createRelease(version, assets) {
|
||||
const payload = assets.payload;
|
||||
const manifest = assets.manifest;
|
||||
|
||||
let branch = 'main';
|
||||
try {
|
||||
branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim() || 'main';
|
||||
} catch (_) { }
|
||||
|
||||
const description = [
|
||||
`## Automated Release ${version}`,
|
||||
'',
|
||||
@@ -110,6 +125,7 @@ async function createRelease(version, assets) {
|
||||
const body = JSON.stringify({
|
||||
name: `Vyla Go Release ${version}`,
|
||||
tag_name: tag,
|
||||
ref: branch,
|
||||
description,
|
||||
assets: {
|
||||
links: [
|
||||
|
||||
Reference in New Issue
Block a user