Skip to content

Commit

Permalink
Improved docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht9277 committed Sep 8, 2023
1 parent c9a3339 commit 7a0925c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/arch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ git clone ssh://[email protected]/cairo-lang.git
cd cairo-lang/
./update-version.sh
```
> This script gets the latest cairo version from [here](https://github.com/starkware-libs/cairo/) and overwrites the `PKGBUILD` and `.SRCINFO` files.
> This script gets the latest cairo-lang version from [here](https://github.com/starkware-libs/cairo/) and overwrites the `PKGBUILD` and `.SRCINFO` files.
* Push the new changes to the remote.
```bash
git push
```
> We need to push our changes to the AUR origin, to update our repo where users will install the package.
Done! Now the AUR repo should have the latest `cairo` version!
Done! Now the AUR repo should have the latest `cairo-lang` version!
36 changes: 36 additions & 0 deletions build/brew/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
![image](https://github.com/lambdaclass/homebrew-cairo-lang/assets/53660242/04463074-fe48-460e-ae39-df14a56a59c2)
# Building packages for Brew

Homebrew is a package manager for MacOS, we can define a custom `formula` for creating our own packages.

### How do I install it?
You can use either the `installer.sh` script, which automates the process, or you can `tap` our repository and do it manually.
```
brew tap lambdaclass/homebrew-cairo-lang
```
Install the desired package

*(Make sure to add the **@** symbol to specify the version!)*
```
brew install lambdaclass/homebrew-cairo-lang/[email protected]
```

### How do I upgrade the formulae repository? <sup><sub>maintainers only!</sub></sup>
* We need to clone the [cairo-lang](https://github.com/lambdaclass/homebrew-cairo-lang) repository.
```bash
git clone [email protected]:lambdaclass/homebrew-cairo-lang.git
```
> This is where the all the formulas are stored. `brew` pulls from here.
* Execute the update script `update-formulae.sh`. This should overwrite the current files within the repo.
```bash
cd homebrew-cairo-lang/
./update-formulae.sh
```
> This script gets the latest cairo-lang version from [here](https://github.com/starkware-libs/cairo/) and overwrites the formulae. If a new version is released, it will appear once the script is executed.
* Push the new changes to the repository.
```bash
git push
```
> We need to push our changes to the repo, so, if any new version is released, it will now be supported.
Done! Now the `brew` repo should have the latest `cairo-lang` version!
2 changes: 1 addition & 1 deletion build/debian/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You can use either the `installer.sh` script, which automates the process, or yo
```bash
./create_deb.sh compile
```
> We pass the `compile` argument to tell the script we want to compile from source before creating the .deb. Not passing the `compile` argument will skip compilation and go straight to the `.deb` creations, which assumes you already have all the different versions compiled. This step will be done for every `cairo` version.
> We pass the `compile` argument to tell the script we want to compile from source before creating the .deb. Not passing the `compile` argument will skip compilation and go straight to the `.deb` creations, which assumes you already have all the different versions compiled. This step will be done for every `cairo-lang` version.
* Once compiled, we want to push the .deb into GitHub.
```bash
find . -type f -name "*.deb" -exec sh -c 'VERSION=$(echo "{}" | sed "s/.*@\(.*\)\.deb/\1/"); gh release create v$VERSION {} --title "v$VERSION" --notes "Cairo v$VERSION .deb binary release."' \;
Expand Down

0 comments on commit 7a0925c

Please sign in to comment.