Created
February 28, 2025 17:30
-
-
Save imaami/89335ea3211ffa088839e4cd154fe9e6 to your computer and use it in GitHub Desktop.
Generate a list of GitHub caching keys from a semantic version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
vsplit() { | |
local k="$1" r | |
while [[ "$k" != "$r" ]]; do | |
echo "$k"; r="$k" | |
k="${k%?${k##*[0-9][.+-]}}" | |
done | |
} | |
vsplit "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment