ci: update bug report as well
This commit is contained in:
parent
aaff7a2be7
commit
04315e7ad8
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -59,6 +59,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git add README.md manifest.json ConfusedPolarBear.Plugin.IntroSkipper/ConfusedPolarBear.Plugin.IntroSkipper.csproj
|
git add README.md manifest.json ConfusedPolarBear.Plugin.IntroSkipper/ConfusedPolarBear.Plugin.IntroSkipper.csproj .github/ISSUE_TEMPLATE/bug_report_form.yml
|
||||||
git commit -m "release v${{ env.NEW_FILE_VERSION }}"
|
git commit -m "release v${{ env.NEW_FILE_VERSION }}"
|
||||||
git push
|
git push
|
||||||
|
@ -22,6 +22,13 @@ if (!fs.existsSync(readmePath)) {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read .github/ISSUE_TEMPLATE/bug_report_form.yml
|
||||||
|
const bugReportFormPath = './.github/ISSUE_TEMPLATE/bug_report_form.yml';
|
||||||
|
if (!fs.existsSync(bugReportFormPath)) {
|
||||||
|
console.error(`${bugReportFormPath} file not found`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
const jsonData = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
const jsonData = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
||||||
|
|
||||||
async function updateManifest() {
|
async function updateManifest() {
|
||||||
@ -41,7 +48,8 @@ async function updateManifest() {
|
|||||||
jsonData[0].versions.unshift(newVersion);
|
jsonData[0].versions.unshift(newVersion);
|
||||||
|
|
||||||
console.log('Manifest updated successfully.');
|
console.log('Manifest updated successfully.');
|
||||||
updateReadMeVersion();
|
updateDocsVersion(readmePath);
|
||||||
|
updateDocsVersion(bugReportFormPath);
|
||||||
|
|
||||||
cleanUpOldReleases();
|
cleanUpOldReleases();
|
||||||
|
|
||||||
@ -109,16 +117,16 @@ function getMD5FromFile() {
|
|||||||
return crypto.createHash('md5').update(fileBuffer).digest('hex');
|
return crypto.createHash('md5').update(fileBuffer).digest('hex');
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateReadMeVersion() {
|
function updateDocsVersion(docsPath) {
|
||||||
const readMeContent = fs.readFileSync(readmePath, 'utf8');
|
const readMeContent = fs.readFileSync(docsPath, 'utf8');
|
||||||
|
|
||||||
const updatedContent = readMeContent
|
const updatedContent = readMeContent
|
||||||
.replace(/Jellyfin.*\(or newer\)/, `Jellyfin ${currentVersion} (or newer)`)
|
.replace(/Jellyfin.*\(or newer\)/, `Jellyfin ${currentVersion} (or newer)`)
|
||||||
if (readMeContent != updatedContent) {
|
if (readMeContent != updatedContent) {
|
||||||
fs.writeFileSync(readmePath, updatedContent);
|
fs.writeFileSync(docsPath, updatedContent);
|
||||||
console.log('Updated README with new Jellyfin version.');
|
console.log(`Updated ${docsPath} with new Jellyfin version.`);
|
||||||
} else {
|
} else {
|
||||||
console.log('README has already newest Jellyfin version.');
|
console.log(`${docsPath} has already newest Jellyfin version.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user