Skip to content

Commit

Permalink
feat: add option for listing noir versions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelelliot committed Dec 13, 2023
1 parent 83ce835 commit f69175d
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit f69175d

Please sign in to comment.