From cd241737965b1c356be701fe45a890f6eb442e47 Mon Sep 17 00:00:00 2001 From: Ender Date: Fri, 29 Mar 2024 18:07:10 +0100 Subject: [PATCH] changed gulpfile.ts to make "npm run package [new version number]" feasible --- gulpfile.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index 73b2ee5..d0a3258 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -375,7 +375,7 @@ async function packageBuild() { if (!fs.existsSync(distPath)) fs.mkdirSync(distPath); // Initialize the zip file - const zipName = `${manifest.file.name}-v${manifest.file.version}.zip`; + const zipName = `${manifest.file.name}.zip`; const zipFile = fs.createWriteStream(zipName); const zip = archiver("zip", { zlib: { level: 9 } }); zipFile.on("close", () => { @@ -473,8 +473,8 @@ const updateManifest = (cb: any) => { const result = `${repoURL}/releases/download`; manifest.file.url = repoURL; - manifest.file.manifest = `${result}/v${manifest.file.version}/${manifest.name}`; - manifest.file.download = `${result}/v${manifest.file.version}/${manifest.file.name}-v${manifest.file.version}.zip`; + manifest.file.manifest = `${result}/latest/${manifest.name}`; + manifest.file.download = `${result}/latest/${manifest.file.name}.zip`; const prettyProjectJson = stringify(manifest.file, { maxLength: 35, @@ -504,7 +504,7 @@ const gitTaskBuild = (cb: gulp.TaskFunctionCallback) => { if (!manifest) return cb(Error("could not load manifest.")); return gulp - .src(`${manifest.file.name}-v${manifest.file.version}.zip`) + .src(`${manifest.file.name}.zip`) .pipe(git.checkout(`v${manifest.file.version}`, { args: "-b" })) .pipe(git.add({ args: "--no-all -f" })) .pipe(git.commit(`v${manifest.file.version}`, { args: "-a", disableAppendPaths: true }));