diff --git a/README.md b/README.md index d928f4a9..c52bc8c9 100644 --- a/README.md +++ b/README.md @@ -650,7 +650,11 @@ contains the following variables: - `version`: The new version - `revision`: The tag's commit SHA - `checksums`: A map containing sha256 checksums for every release asset. Use - the full filename to access the sha, e.g. `checksums.MyProgram-x86` + the full filename to access the sha, e.g. `checksums.MyProgram-x86`. If the + filename contains dots (`.`), they are being replaced with `__`. If the + filename contains the currently released version, it is replaced with `__VERSION__`. + For example, `sentry-wizard-v3.9.3.tgz` checksums will be accessible by the key + `checksums.sentry-wizard-v__VERSION____tgz`. **Environment** diff --git a/src/targets/brew.ts b/src/targets/brew.ts index 2d57d043..2fabf083 100644 --- a/src/targets/brew.ts +++ b/src/targets/brew.ts @@ -163,7 +163,8 @@ export class BrewTarget extends BaseTarget { const checksums: any = {}; await mapLimit(filesList, MAX_DOWNLOAD_CONCURRENCY, async file => { - checksums[file.filename] = await this.artifactProvider.getChecksum( + const key = file.filename.replace(version, '__VERSION__'); + checksums[key] = await this.artifactProvider.getChecksum( file, HashAlgorithm.SHA256, HashOutputFormat.Hex