projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d739ba
)
added list-versions command to onyx-pkg
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sun, 22 May 2022 21:03:36 +0000
(16:03 -0500)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Sun, 22 May 2022 21:03:36 +0000
(16:03 -0500)
scripts/onyx-pkg.onyx
patch
|
blob
|
history
diff --git
a/scripts/onyx-pkg.onyx
b/scripts/onyx-pkg.onyx
index 4ef06eb8d76465234d4db6cd2a7be3c268c9dd04..8c7183e26f369b3beb68bf1d592e5fb7976efc7e 100644
(file)
--- a/
scripts/onyx-pkg.onyx
+++ b/
scripts/onyx-pkg.onyx
@@
-396,6
+396,22
@@
run_publish_command :: (args: [] cstr) {
}
}
+#tag Command.{ "list-versions", "List all installable versions of a remote package.", "[package-url]", require_config_file=false }
+run_list_versions :: (args: [] cstr) {
+ if args.count < 1 {
+ return;
+ }
+
+ pack := string.as_str(args[0]);
+
+ versions := Git.get_available_versions(pack);
+ defer delete(^versions);
+
+ for versions {
+ printf("- {}\n", it);
+ }
+}
+
#local {
#if runtime.compiler_os == .Linux {