Skip to content

Commit

Permalink
Merge pull request #1 from claudiodekker/archlinux
Browse files Browse the repository at this point in the history
Add ungoogled-software/ungoogled-chromium-archlinux
  • Loading branch information
claudiodekker authored Feb 6, 2024
2 parents 5fe0003 + 1219f68 commit 30aeed3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions public/repositories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,37 @@ export default {
}),
}))
},
'ungoogled-software/ungoogled-chromium-archlinux': async (release) => {
const pattern = /ungoogled-chromium[_-](?:(?<debug>debug)[_-])?(?<version>\d+(?:[.]\d+)+)-(?<revision>\d+)-(?<arch>x86_64|arm64)\.pkg\.tar\.zst/g
const hashesPattern = /(?<sha256>[A-Fa-f0-9]{64}) {2}(?<name>ungoogled-chromium.*?\.pkg\.tar\.zst)\n/g

const hashes = HELPERS.extractMany(release.body, hashesPattern)

return HELPERS.githubReleaseDefaultMapper(release, (release) => ({
...release,
name: 'Ungoogled-Chromium ' + release.tag_name,
assets: release.assets
.map((asset) => {
const assetDetails = HELPERS.extract(asset.name, pattern)
if (Object.keys(assetDetails).length === 0) {
return false
}

const assetHashes = hashes.find((hash) => hash.name === asset.name)

return {
...asset,
arch: assetDetails.arch === 'x86_64' ? ENUMS.ARCH.x86_64 : ENUMS.ARCH.arm64,
os: ENUMS.OS.linux,
discriminator: assetDetails.debug === 'debug' ? 'DEBUG' : undefined,
hashes: {
sha256: assetHashes.sha256,
},
}
})
.filter(Boolean),
}))
},
'ungoogled-software/ungoogled-chromium-macos': async (release) => {
const filenamePattern = /ungoogled-chromium[_-](?<version>\d+(?:[.]\d+)+)-(?<revision>\d+)\.(?<package_revision>\d+)_(?<arch>x86-64|arm64)-macos\.dmg/
const hashesPattern = /disk image `(?<name>ungoogled-chromium_.*)`: \n\n```\nmd5: (?<md5>.*)\nsha1: (?<sha1>.*)\nsha256: (?<sha256>.*)\n```/g
Expand Down

0 comments on commit 30aeed3

Please sign in to comment.