Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/deploy-tap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,19 @@ jobs:
- name: Copy formula and README into tap
if: github.event_name != 'pull_request'
run: |
set -euo pipefail
mkdir -p tap-repo/Formula
cp packaging/homebrew/mfc.rb tap-repo/Formula/mfc.rb
# If the release URL is unchanged, keep the tap's existing bottle block so a
# formula-only push to master doesn't delete bottles already built for this version.
NEW_URL="$(grep -E '^ url ' packaging/homebrew/mfc.rb || true)"
OLD_URL="$(grep -E '^ url ' tap-repo/Formula/mfc.rb 2>/dev/null || true)"
if [[ -n "${NEW_URL}" && "${NEW_URL}" == "${OLD_URL}" ]] && grep -q '^ bottle do' tap-repo/Formula/mfc.rb; then
awk '/^ bottle do/,/^ end$/' tap-repo/Formula/mfc.rb > /tmp/bottle.block
awk '{ print } /^ head / { print ""; while ((getline line < "/tmp/bottle.block") > 0) print line }' \
packaging/homebrew/mfc.rb > tap-repo/Formula/mfc.rb
else
cp packaging/homebrew/mfc.rb tap-repo/Formula/mfc.rb
fi
cp packaging/homebrew/README.md tap-repo/README.md

- name: Commit & push if changed
Expand Down
6 changes: 3 additions & 3 deletions packaging/homebrew/mfc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
class Mfc < Formula
desc "Exascale multiphase/multiphysics compressible flow solver"
homepage "https://mflowcode.github.io/"
url "https://github.com/MFlowCode/MFC/archive/refs/tags/v5.2.0.tar.gz"
sha256 "aaee855302950cb6bd8497170a6737214ed9a47ad3d109258f5b27ee2b78fe3d"
url "https://github.com/MFlowCode/MFC/archive/refs/tags/v5.5.0.tar.gz"
sha256 "05499f28291654ee5cc7f4344c85b5b12707e43e8408e7a28b96e43020e42959"
license "MIT"
head "https://github.com/MFlowCode/MFC.git", branch: "master"

Expand All @@ -28,7 +28,7 @@ class Mfc < Formula
def install
# Create Python virtual environment inside libexec (inside Cellar for proper bottling)
venv = libexec/"venv"
system Formula["python@3.12"].opt_bin/"python3.12", "-m", "venv", venv
system formula_opt_bin("python@3.12")/"python3.12", "-m", "venv", venv
system venv/"bin/pip", "install", "--upgrade",
"pip", "setuptools", "wheel",
"setuptools-scm",
Expand Down
Loading