Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option for listing noir versions #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
10 changes: 10 additions & 0 deletions noirup
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ main() {
-p|--path) shift; NOIRUP_LOCAL_REPO=$1;;
-P|--pr) shift; NOIRUP_PR=$1;;
-C|--commit) shift; NOIRUP_COMMIT=$1;;
-l|--list)
list
exit 0
;;
-h|--help)
usage
exit 0
Expand Down Expand Up @@ -193,9 +197,15 @@ OPTIONS:
-r, --repo Install from a remote GitHub repo (uses default branch if no other options are set)
-p, --path Install a local repository
-f, --features Activates feature flags when building from source: "feature1 feature2"
-l, --list List available versions of Noir
EOF
}

list() {
# Fetch, sort, and print tags from the noir repository
ensure git ls-remote --tags --refs https://github.com/noir-lang/noir | awk -F'/' '{print $3}' | grep '^v' | sort -rV
}

say() {
printf 'noirup: %s\n' "$1"
}
Expand Down
Loading