Skip to content

Commit

Permalink
add homebrew installation
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed Dec 18, 2024
1 parent 0fe2882 commit fc16b3c
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 1 deletion.
37 changes: 37 additions & 0 deletions Formula/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# README

## Publishing

- find the directlink to new archive in releases
https://github.com/hetalang/heta-compiler/releases/download/v0.9.2/heta-compiler-macos.tar.gz

- calculate checksum
```sh
shasum -a 256 heta-compiler-macos.tar.gz
```
- update url and sha256 in Formula/heta-compiler.rb

- testing
```sh
brew install --build-from-source Formula/heta-compiler.rb
```

## Installation

```sh
brew tap hetalang/heta-compiler
brew install heta-compiler
```

## Update

```sh
brew update
brew upgrade heta-compiler
```

## Uninstall

```sh
brew uninstall heta-compiler
```
25 changes: 25 additions & 0 deletions Formula/heta-compiler.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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"
sha256 "a5ecd974c941d71c20ba71e37dc5e048ac42bb2a2e36147bc363bea315d25293"
license "Apache-2.0"

def install
bin.install "heta"
end

def caveats
if Hardware::CPU.arm?
<<~EOS
This formula installs an x64 binary. If you are using an Apple Silicon Mac (M1/M2),
make sure Rosetta 2 is installed to run this software. You can install Rosetta 2 with:
softwareupdate --install-rosetta --agree-to-license
EOS
end
end

test do
system "#{bin}/heta", "-v"
end
end
18 changes: 18 additions & 0 deletions build-choco/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,21 @@ choco apikey --key <your-api-key> --source https://push.chocolatey.org/
choco push heta-compiler.0.9.2.nupkg --source https://push.chocolatey.org/
#choco push heta-compiler.0.9.2.nupkg --source=https://push.chocolatey.org/ --api-key=<your-api-key>
```

## Installation

```ps1
choco install heta-compiler
```

## Update

```ps1
choco upgrade heta-compiler
```

## Uninstall

```ps1
choco uninstall heta-compiler
```
21 changes: 20 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Metelkin, E., (2021). Heta compiler: a software tool for the development of larg

### Installation in Ubuntu/Debian Linux

Install as .deb package
Install/Update as .deb package
```bash
wget https://github.com/hetalang/heta-compiler/releases/latest/download/heta-compiler-x64.deb
sudo dpkg -i heta-compiler-x64.deb
Expand All @@ -75,6 +75,25 @@ echo "export PATH=$PATH:~/bin" >> ~/.bashrc
source ~/.bashrc
```

### Installation with Homebrew in MacOS

If you have [Homebrew installed](https://brew.sh/), you can install Heta compiler using the following commands:
```bash
brew tap hetalang/heta-compiler
brew install heta-compiler
```

Update Heta compiler
```bash
brew update
brew upgrade heta-compiler
```

Uninstall Heta compiler
```bash
brew uninstall heta-compiler
```

### Installation in Macos

For all users (requires sudo previleges)
Expand Down

0 comments on commit fc16b3c

Please sign in to comment.