Skip to content

Commit

Permalink
fix bottle update code
Browse files Browse the repository at this point in the history
  • Loading branch information
jhheider committed Aug 1, 2023
1 parent 24c3d8d commit 6631ed2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/actions/bump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ for (const pkg of livecheck) {
const newBottleBlock = generateBottleBlock(bottles, newVersion)

const newFormula = formula.replaceAll(url, newUrl).replace(/ sha256 ".+"/, ` sha256 "${newSha}"`)
.replace(/bottle do[\s\S]*?end/m, newBottleBlock)
.replace(/bottle do[\s\S]*?end$/m, newBottleBlock)

await Deno.writeTextFile(`${name}.rb`, newFormula)

Expand Down Expand Up @@ -162,11 +162,11 @@ function generateBottleBlock(bottles: Bottle[], version: string) {
for (const { platform, sha256 } of bottles) {
if (platform === "x86_64_linux") {
bottleBlock += "" +
" # Linux bottles fail currently: patchelf breaks deno compiled binaries.\n" +
" # https://github.com/teaxyz/brewkit/blob/main/share/brewkit/fix-elf.ts#L38-L42\n" +
" # and it's not possible to skip relocation in linuxbrew:\n" +
" # https://github.com/Homebrew/brew/blob/d1f60aea49d35fc0ba8f02a1f4fd26d0a369e071/Library/Homebrew/extend/os/linux/software_spec.rb\n" +
` #sha256 cellar: :any_skip_relocation, ${platform}: "${sha256}"\n`
" # Linux bottles fail currently: patchelf breaks deno compiled binaries.\n" +
" # https://github.com/teaxyz/brewkit/blob/main/share/brewkit/fix-elf.ts#L38-L42\n" +
" # and it's not possible to skip relocation in linuxbrew:\n" +
" # https://github.com/Homebrew/brew/blob/d1f60aea49d35fc0ba8f02a1f4fd26d0a369e071/Library/Homebrew/extend/os/linux/software_spec.rb\n" +
` #sha256 cellar: :any_skip_relocation, ${platform}: "${sha256}"\n`
} else {
bottleBlock += ` sha256 cellar: :any_skip_relocation, ${platform}: "${sha256}"\n`
}
Expand Down

0 comments on commit 6631ed2

Please sign in to comment.