aboutsummaryrefslogtreecommitdiff
path: root/bin/ovsx_package_last_published_version
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ovsx_package_last_published_version')
-rwxr-xr-xbin/ovsx_package_last_published_version8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/ovsx_package_last_published_version b/bin/ovsx_package_last_published_version
new file mode 100755
index 0000000..80c25c2
--- /dev/null
+++ b/bin/ovsx_package_last_published_version
@@ -0,0 +1,8 @@
+#!/usr/bin/env sh
+set -e
+
+PUBLISHER=$1
+PACKAGE_NAME=$2
+
+(npx ovsx get --metadata "${PUBLISHER}.${PACKAGE_NAME}" || echo '{"version":"not yet published"}') |
+ jq -r .version