From 2427328324d73e4179d6e86481f7cd28f852a251 Mon Sep 17 00:00:00 2001 From: Elysia Orbit Date: Thu, 2 Nov 2023 13:08:07 +0100 Subject: [PATCH] added sha512 for alpine buildfile --- .woodpecker.release/release.ts | 6 +++++- Makefile | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.woodpecker.release/release.ts b/.woodpecker.release/release.ts index bff71bf..7d84655 100644 --- a/.woodpecker.release/release.ts +++ b/.woodpecker.release/release.ts @@ -29,11 +29,13 @@ if (!ci_build_number) { const tarball_artifact = `librewolf-${version}.source.tar.gz`; const sha256sum_artifact = `${tarball_artifact}.sha256sum`; +const sha512sum_artifact = `${tarball_artifact}.sha512sum`; const tarballExists = fs.existsSync(path.join('..', tarball_artifact)); const sha256sumExists = fs.existsSync(path.join('..', sha256sum_artifact)); +const sha512sumExists = fs.existsSync(path.join('..', sha512sum_artifact)); if (!tarballExists || !sha256sumExists) { - console.error(`Missing artifacts. Ensure both ${tarball_artifact} and ${sha256sum_artifact} are present in the parent directory.`); + console.error(`Missing artifacts. Ensure both ${tarball_artifact}, ${sha256sum_artifact} and ${sha512sum_artifact} are present in the parent directory.`); process.exit(1); } @@ -78,6 +80,7 @@ async function createNewRelease() { * [${tarball_artifact}](https://storage.ci.librewolf.net/artifacts/${ci_build_number}/librewolf-${version}.source.tar.gz) * [${sha256sum_artifact}](https://storage.ci.librewolf.net/artifacts/${ci_build_number}/librewolf-${version}.source.tar.gz.sha256sum) +* [${sha512sum_artifact}](https://storage.ci.librewolf.net/artifacts/${ci_build_number}/librewolf-${version}.source.tar.gz.sha512sum) Note: these artifacts don't have a long shelflife on our current s3 server, but it demonstrates the use of exernal storage to store big artifacts. `, @@ -93,6 +96,7 @@ Note: these artifacts don't have a long shelflife on our current s3 server, but if (response.status === 201) { // await addReleaseArtifact(tarball_artifact, response.data.id); await addReleaseArtifact(sha256sum_artifact, response.data.id); + await addReleaseArtifact(sha512sum_artifact, response.data.id); console.log(`Successfully built release: ${releaseUrl}`); } else { throw new Error(`Failed to create release. Unexpected response status: ${response.status}`); diff --git a/Makefile b/Makefile index 2d9e4d5..02370a7 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ all : $(lw_source_tarball) clean : - rm -rf *~ public_key.asc $(ff_source_dir) $(lw_source_dir) $(lw_source_tarball) $(lw_source_tarball).sha256sum firefox-$(version) patchfail.out patchfail-fuzz.out + rm -rf *~ public_key.asc $(ff_source_dir) $(lw_source_dir) $(lw_source_tarball) $(lw_source_tarball).sha256sum $(lw_source_tarball).sha512sum firefox-$(version) patchfail.out patchfail-fuzz.out veryclean : clean rm -f $(ff_source_tarball) $(ff_source_tarball).asc @@ -99,6 +99,9 @@ $(lw_source_tarball) : $(lw_source_dir) sha256sum $(lw_source_tarball) > $(lw_source_tarball).sha256sum cat $(lw_source_tarball).sha256sum sha256sum -c $(lw_source_tarball).sha256sum + sha512sum $(lw_source_tarball) > $(lw_source_tarball).sha512sum + cat $(lw_source_tarball).sha512sum + sha512sum -c $(lw_source_tarball).sha512sum [ "$(SIGNING_KEY)" != "" ] && cp -v $(SIGNING_KEY) pk.asc ; true if [ -f pk.asc ]; then gpg --import pk.asc; gpg --detach-sign $(lw_source_tarball) && ls -lh $(lw_source_tarball).sig; fi ls -lh $(lw_source_tarball)*