Created
October 14, 2019 10:57
-
-
Save mfojtik/5f182223144cf7ff8c683ef63073697a to your computer and use it in GitHub Desktop.
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 | |
repo_name=$1 | |
repo_head=$(git ls-remote [email protected]:openshift/${repo_name} HEAD | sed 's/HEAD//') | |
commit_date=$(curl -s https://api.github.com/repos/openshift/${repo_name}/git/commits/${repo_head} | jq -r ".committer.date") | |
go mod edit -replace github.com/openshift/${repo_name}=github.com/openshift/${repo_name}@"v0.0.0-$(echo $commit_date | sed "s/[-:TZ]//g")-${repo_head:0:12}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment