mirror of
https://gitlab.com/vyla-entertainment/go.git
synced 2026-11-09 13:07:21 -05:00
update
This commit is contained in:
22
release.js
22
release.js
@@ -32,11 +32,21 @@ function incrementVersion() {
|
|||||||
function gitCommitAndTag(version) {
|
function gitCommitAndTag(version) {
|
||||||
try {
|
try {
|
||||||
execSync('git add package.json src-tauri/tauri.conf.json', { stdio: 'inherit' });
|
execSync('git add package.json src-tauri/tauri.conf.json', { stdio: 'inherit' });
|
||||||
execSync(`git commit -m "chore: release ${version}"`, { stdio: 'inherit' });
|
try {
|
||||||
execSync(`git tag -a ${version} -m "Release ${version}"`, { stdio: 'inherit' });
|
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' });
|
execSync('git push origin HEAD --tags', { stdio: 'inherit' });
|
||||||
} catch (e) {
|
} 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 payload = assets.payload;
|
||||||
const manifest = assets.manifest;
|
const manifest = assets.manifest;
|
||||||
|
|
||||||
|
let branch = 'main';
|
||||||
|
try {
|
||||||
|
branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim() || 'main';
|
||||||
|
} catch (_) { }
|
||||||
|
|
||||||
const description = [
|
const description = [
|
||||||
`## Automated Release ${version}`,
|
`## Automated Release ${version}`,
|
||||||
'',
|
'',
|
||||||
@@ -110,6 +125,7 @@ async function createRelease(version, assets) {
|
|||||||
const body = JSON.stringify({
|
const body = JSON.stringify({
|
||||||
name: `Vyla Go Release ${version}`,
|
name: `Vyla Go Release ${version}`,
|
||||||
tag_name: tag,
|
tag_name: tag,
|
||||||
|
ref: branch,
|
||||||
description,
|
description,
|
||||||
assets: {
|
assets: {
|
||||||
links: [
|
links: [
|
||||||
|
|||||||
Reference in New Issue
Block a user