diff --git a/Formula/README.md b/Formula/README.md new file mode 100644 index 00000000..f3427c94 --- /dev/null +++ b/Formula/README.md @@ -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 +``` diff --git a/Formula/heta-compiler.rb b/Formula/heta-compiler.rb new file mode 100644 index 00000000..5b83e3a4 --- /dev/null +++ b/Formula/heta-compiler.rb @@ -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 diff --git a/build-choco/README.md b/build-choco/README.md index 69dd8340..8362e8ba 100644 --- a/build-choco/README.md +++ b/build-choco/README.md @@ -27,3 +27,21 @@ choco apikey --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= ``` + +## Installation + +```ps1 +choco install heta-compiler +``` + +## Update + +```ps1 +choco upgrade heta-compiler +``` + +## Uninstall + +```ps1 +choco uninstall heta-compiler +``` diff --git a/index.md b/index.md index b4483499..522bf79b 100644 --- a/index.md +++ b/index.md @@ -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 @@ -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)