Skip to content

Commit

Permalink
Fix pseudo version calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhita committed Jun 19, 2019
1 parent 10e4942 commit c68dece
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions artifacts/scripts/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ update-deps-in-gomod() {
}

gomod-pseudo-version() {
TZ=GMT git show -q --pretty='format:v0.0.0-%cd-%h' --date='format:%Y%m%d%H%M%S' --abbrev=12
TZ=GMT git show -q --pretty='format:v0.0.0-%cd-%h' --date='format-local:%Y%m%d%H%M%S' --abbrev=12
}

# checkout the dependencies to the versions corresponding to the kube commit of HEAD
Expand Down Expand Up @@ -930,7 +930,7 @@ checkout-deps-to-kube-commit() {
echo "Packaging up pseudo version ${pseudo_version} into go mod cache..."
mkdir -p "${cache_dir}"
cp go.mod "${cache_dir}/${pseudo_version}.mod"
echo "{\"Version\":\"${pseudo_version}\",\"Name\":\"$(git rev-parse HEAD)\",\"Short\":\"$(git show -q --abbrev=12 --pretty='format:%h' HEAD)\",\"Time\":\"$(TZ=GMT git show -q --pretty='format:%cd' --date='format:%Y-%m-%dT%H:%M:%SZ')\"}" > "${cache_dir}/${pseudo_version}.info"
echo "{\"Version\":\"${pseudo_version}\",\"Name\":\"$(git rev-parse HEAD)\",\"Short\":\"$(git show -q --abbrev=12 --pretty='format:%h' HEAD)\",\"Time\":\"$(TZ=GMT git show -q --pretty='format:%cd' --date='format-local:%Y-%m-%dT%H:%M:%SZ')\"}" > "${cache_dir}/${pseudo_version}.info"
pushd "${GOPATH}/src" >/dev/null
/gomod-zip --package-name="${base_package}/${dep}" --pseudo-version="${pseudo_version}"
popd >/dev/null
Expand Down

0 comments on commit c68dece

Please sign in to comment.