mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-02 00:10:42 +02:00
Fix release script issue (#5459)
This commit is contained in:
parent
46f771e9a2
commit
845c6e1189
@ -101,12 +101,30 @@ export function buildImage(repoNames, tags, target, buildArgs = "", dockerfile =
|
|||||||
/**
|
/**
|
||||||
* Check if the version already exists on Docker Hub
|
* Check if the version already exists on Docker Hub
|
||||||
* TODO: use semver to compare versions if it is greater than the previous?
|
* TODO: use semver to compare versions if it is greater than the previous?
|
||||||
* @param {string} repoName Docker Hub repository name
|
* @param {string[]} repoNames repository name (Only check the name with single slash)
|
||||||
* @param {string} version Version to check
|
* @param {string} version Version to check
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
export async function checkTagExists(repoName, version) {
|
export async function checkTagExists(repoNames, version) {
|
||||||
console.log(`Checking if version ${version} exists on Docker Hub`);
|
// Skip if the tag is not on Docker Hub
|
||||||
|
// louislam/uptime-kuma
|
||||||
|
let dockerHubRepoNames = repoNames.filter((name) => {
|
||||||
|
return name.split("/").length === 2;
|
||||||
|
});
|
||||||
|
|
||||||
|
for (let repoName of dockerHubRepoNames) {
|
||||||
|
await checkTagExistsSingle(repoName, version);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if the version already exists on Docker Hub
|
||||||
|
* @param {string} repoName repository name
|
||||||
|
* @param {string} version Version to check
|
||||||
|
* @returns {Promise<void>}
|
||||||
|
*/
|
||||||
|
export async function checkTagExistsSingle(repoName, version) {
|
||||||
|
console.log(`Checking if version ${version} exists on Docker Hub:`, repoName);
|
||||||
|
|
||||||
// Get a list of tags from the Docker Hub repository
|
// Get a list of tags from the Docker Hub repository
|
||||||
let tags = [];
|
let tags = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user