mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 10:16:46 +00:00
Update version bump to make it smart
This commit is contained in:
parent
e4d55e6842
commit
55c56d53f4
@ -16,14 +16,31 @@ function today() {
|
|||||||
)}${String(now.getDate()).padStart(2, "0")}.0`;
|
)}${String(now.getDate()).padStart(2, "0")}.0`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function auto(version) {
|
||||||
|
const todayVersion = today();
|
||||||
|
if (todayVersion !== version) {
|
||||||
|
return todayVersion;
|
||||||
|
}
|
||||||
|
return patch(version);
|
||||||
|
}
|
||||||
|
|
||||||
const methods = {
|
const methods = {
|
||||||
patch,
|
patch,
|
||||||
today,
|
today,
|
||||||
|
auto,
|
||||||
};
|
};
|
||||||
|
|
||||||
async function main(args) {
|
async function main(args) {
|
||||||
const method = args.length > 0 && methods[args[0]];
|
let method;
|
||||||
const commit = args.length > 1 && args[1] == "--commit";
|
let commit;
|
||||||
|
|
||||||
|
if (args.length === 0) {
|
||||||
|
method = methods.auto;
|
||||||
|
commit = true;
|
||||||
|
} else {
|
||||||
|
method = args.length > 0 && methods[args[0]];
|
||||||
|
commit = args.length > 1 && args[1] == "--commit";
|
||||||
|
}
|
||||||
|
|
||||||
if (!method) {
|
if (!method) {
|
||||||
console.error(
|
console.error(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user