Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Aug 23, 2023
1 parent 0db9fb2 commit c1c0583
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
./scripts/update.sh > Formula/fe.rb
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions Bot"
git checkout -b testbranch2
git checkout -b testbranch3
git add .
git commit -m "Automatic commit via GitHub Actions"
git push origin testbranch2 # Replace with the desired branch
git commit -m "Added new Release via GitHub Actions"
git push origin testbranch3 # Replace with the desired branch
6 changes: 3 additions & 3 deletions Formula/fe.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

class Fe < Formula

Check failure on line 2 in Formula/fe.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Layout/LeadingEmptyLines: Unnecessary blank line at the beginning of the source.
desc "Compiler for the Fe programming language"
homepage "https://github.com/ethereum/fe"
version "0.22.0"

if OS.mac?
url "https://github.com/ethereum/fe/releases/download/v0.24.0/fe_mac"
url "https://github.com/ethereum/fe/releases/download/v0.22.0/fe_mac"
sha256 "a6529f56ad32ed67f387ef85d7fe84f87d302ac12474f8fda93a442836f5073f"
end

if OS.linux? && Hardware::CPU.intel?
url "https://github.com/ethereum/fe/releases/download/v0.24.0/fe_amd64"
url "https://github.com/ethereum/fe/releases/download/v0.22.0/fe_amd64"
sha256 "19a5fb1d9c92302f75a5e1c39f3a47df9c037fd69fc75bb2d5e78823a34ccd36"
end

Expand Down
2 changes: 1 addition & 1 deletion scripts/archive-current-formula.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd $(dirname "$0") || exit
input_file="../Formula/fe.rb"

# Extract the version from the input file
version=$(grep -o 'version "[^"]*' "$input_file" | awk -F'"' '{print $2}')
version=$(grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+' "$input_file" | head -n 1 | sed 's/v//')

# Check if version is not empty
if [ -n "$version" ]; then
Expand Down
6 changes: 5 additions & 1 deletion scripts/get-formula-version.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#!/bin/bash

# Change the working directory to the script's directory
cd $(dirname "$0") || exit

file_path="../Formula/fe.rb"

# Extract version using grep and awk
version=$(grep -o 'version "[^"]*' "$file_path" | awk -F'"' '{print $2}')
#version=$(grep -o 'version "[^"]*' "$file_path" | awk -F'"' '{print $2}')
version=$(grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+' "$file_path" | head -n 1 | sed 's/v//')
echo $version
3 changes: 1 addition & 2 deletions scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ sha256_mac=$(curl -Ls "$url_mac" | shasum -a 256 | awk '{print $1}')
blueprint="class Fe < Formula
desc \"Compiler for the Fe programming language\"
homepage \"https://github.com/ethereum/fe\"
version \"${version}\"
if OS.mac?
url \"https://github.com/ethereum/fe/releases/download/v${version}/fe_mac\"
sha256 \"${sha256_mac}\"
Expand Down

0 comments on commit c1c0583

Please sign in to comment.