Skip to content

Instantly share code, notes, and snippets.

@mehdichaouch
Created September 4, 2019 14:31
Show Gist options
  • Save mehdichaouch/fe6687bd978b4661eaecdfa3d2e7399b to your computer and use it in GitHub Desktop.
Save mehdichaouch/fe6687bd978b4661eaecdfa3d2e7399b to your computer and use it in GitHub Desktop.
Bash Shell script - Get latest tag from GitHub API via CLI
#!/bin/bash
curl --silent "https://api.github.com/repos/google/site-kit-wp/tags" | grep '"name":' | sed -E 's/.*"([^"]+)".*/\1/' | head -n1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment