From d3d0f2cb1dc1748b44705acb7074145174b87db2 Mon Sep 17 00:00:00 2001 From: Evgeny Metelkin Date: Wed, 8 Jan 2025 15:59:14 +0200 Subject: [PATCH] substitute version --- .github/workflows/on-release.yml | 4 ++-- .../{heta-compiler.rb => heta-compiler.template.rb} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename build-homebrew/{heta-compiler.rb => heta-compiler.template.rb} (95%) diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 1dc37970..79ce0b4f 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -57,8 +57,8 @@ jobs: git config user.name "GitHub Actions" git config user.email "actions@github.com" mkdir -p Formula - cp -f ../build-homebrew/heta-compiler.rb Formula/ # copy the new formula and replace the old one - ls + cp -f ../build-homebrew/heta-compiler.template.rb Formula/heta-compiler.rb # copy the new formula and replace the old one + sed -i '' "s|\\\$VERSION|${{ github.event.release.tag_name }}|" Formula/heta-compiler.rb git add . git commit -m "Automated update from source repository based on release ${{ github.event.release.tag_name }}" git push origin master diff --git a/build-homebrew/heta-compiler.rb b/build-homebrew/heta-compiler.template.rb similarity index 95% rename from build-homebrew/heta-compiler.rb rename to build-homebrew/heta-compiler.template.rb index b8d5b260..db30cfca 100644 --- a/build-homebrew/heta-compiler.rb +++ b/build-homebrew/heta-compiler.template.rb @@ -1,7 +1,7 @@ class HetaCompiler < Formula desc "CLI for Heta Compiler" homepage "https://hetalang.github.io/#/heta-compiler/" - url "https://github.com/hetalang/heta-compiler/releases/download/v0.9.2/heta-compiler-macos.tar.gz" + url "https://github.com/hetalang/heta-compiler/releases/download/$VERSION/heta-compiler-macos.tar.gz" sha256 "a5ecd974c941d71c20ba71e37dc5e048ac42bb2a2e36147bc363bea315d25293" license "Apache-2.0"