mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Release script updates (#13161)
add mibs category revert changelog when exiting to prevent double log
This commit is contained in:
parent
64e91aa809
commit
54964e0c42
@ -63,6 +63,7 @@ class GitHub
|
||||
'translation' => [],
|
||||
'tests' => [],
|
||||
'misc' => [],
|
||||
'mibs' => [],
|
||||
'dependencies' => [],
|
||||
];
|
||||
protected $changelog_users = [];
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use LibreNMS\Util\GitHub;
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
Artisan::command('release:tag
|
||||
{tag : The new tag / version}
|
||||
@ -9,14 +10,17 @@ Artisan::command('release:tag
|
||||
{--pr= : The last PR to include in this release if not master branch}', function () {
|
||||
$tag = $this->argument('tag');
|
||||
$this->info("Creating release $tag.....");
|
||||
|
||||
$file = $this->option('file') ?: 'doc/General/Changelog.md';
|
||||
$gh = new GitHub(
|
||||
$tag,
|
||||
$this->argument('from'),
|
||||
$file,
|
||||
getenv('GH_TOKEN') ?: $this->secret('Enter a GitHub Token?'),
|
||||
$this->option('pr')
|
||||
);
|
||||
|
||||
try {
|
||||
$gh = new GitHub(
|
||||
$tag,
|
||||
$this->argument('from'),
|
||||
$this->option('file') ?: 'doc/General/Changelog.md',
|
||||
getenv('GH_TOKEN') ?: $this->secret('Enter a GitHub Token?'),
|
||||
$this->option('pr')
|
||||
);
|
||||
$gh->createChangelog();
|
||||
$this->info("Changelog generated for $tag");
|
||||
|
||||
@ -34,4 +38,7 @@ Artisan::command('release:tag
|
||||
} catch (\Exception $e) {
|
||||
$this->error($e->getMessage());
|
||||
}
|
||||
|
||||
// remove changelog modifications
|
||||
(new Process(['git', 'checkout', base_path($file)]))->run();
|
||||
})->purpose('Create a new LibreNMS release including changelog');
|
||||
|
Loading…
Reference in New Issue
Block a user