0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 13:43:04 -05:00

Merge pull request 'added sha512 for alpine buildfile' (!66) from ElysiaOrbit/source:main into main

Reviewed-on: https://codeberg.org/librewolf/source/pulls/66
This commit is contained in:
Bert van der Weerd 2023-11-03 13:59:17 +00:00
commit 54b6ae318f
2 changed files with 9 additions and 2 deletions

View file

@ -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}`);

View file

@ -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)*