Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Review comments addressed
Browse files Browse the repository at this point in the history
Signed-off-by: Prem Kumar Kalle <pkalle@vmware.com>
  • Loading branch information
prkalle committed Oct 10, 2022
1 parent 9eb17cd commit 63e05d5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/dev_tag_retrieval_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
echo ::set-output name=NEXT_VERSION::$major.$minor.$patch-dev
- name: Update version in file
run: sed -i -e "/TKGManagementClusterPluginVersion/ s/= .*/= \"${{ steps.next_version.outputs.NEXT_VERSION }}\"/" tkg/tkgconfigpaths/zz_bundled_default_bom_files_configdata.go
run: |
sed -i -e "/TKGManagementClusterPluginVersion/ s/= .*/= \"${{ steps.next_version.outputs.NEXT_VERSION }}\"/" tkg/tkgconfigpaths/zz_bundled_default_bom_files_configdata.go
sed -i -e "/Version/ s/= .*/= \"${{ steps.next_version.outputs.NEXT_VERSION }}\"/" cli/runtime/version/zz_generated_plugin_runtime_version.go
- name: Set variables
id: vars
Expand Down
2 changes: 1 addition & 1 deletion cli/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ all: test ## Tests the library
.PHONY: configure-version
configure-version: ## Configure plugin runtime version
# Update plugin runtime version variable in version pkg
sed "s+TANZU_PLUGIN_RUNTIME_VERSION+${BUILD_VERSION}+g" hack/update-bundled-plugin-runtime-version/update-bundled-plugin-runtime-version.txt > version/zz_bundled_plugin_runtime_version.go
sed "s+TANZU_PLUGIN_RUNTIME_VERSION+${BUILD_VERSION}+g" hack/update-bundled-plugin-runtime-version/update-bundled-plugin-runtime-version.txt > version/zz_generated_plugin_runtime_version.go

## --------------------------------------
## Testing
Expand Down
15 changes: 8 additions & 7 deletions hack/verify-dirty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ echo "Verify uncommitted files..."
echo "#############################"

# Option to ignore changes to compatibility image path in
# tkg/tkgconfigpaths/zz_bundled_default_bom_files_configdata.go. This is to support `usebom` directive
# tkg/tkgconfigpaths/zz_bundled_default_bom_files_configdata.go and plugin runtime version in
# cli/runtime/version/zz_generated_plugin_runtime_version.go. This is to support `usebom` directive
# in tests.
ignore_file=':!tkg/tkgconfigpaths/zz_bundled_default_bom_files_configdata.go'
ignore_files=(':(exclude)tkg/tkgconfigpaths/zz_bundled_default_bom_files_configdata.go' ':(exclude)cli/runtime/version/zz_generated_plugin_runtime_version.go')
# Temporarily excluding UI generated bindata file from verify (zz_generated.bindata.go). Currently running into issues
# blocking the CI main build. CI generated bindata is different from bindata file generated on local
# developer machines, causing this failure. Need to root cause and then remove this exclusion.
ignore_file_ui_bindata=':!tkg/manifest/server/zz_generated.bindata.go'

if ! (git diff --quiet HEAD -- . "${ignore_file}" "${ignore_file_ui_bindata}"); then
if ! (git diff --quiet HEAD -- . "${ignore_files[@]}" "${ignore_file_ui_bindata}"); then
echo -e "\nThe following files are uncommitted. Please commit them or add them to .gitignore:";
git diff --name-only HEAD -- . "${ignore_file}" "${ignore_file_ui_bindata}" | awk '{print "- " $0}'
git diff --name-only HEAD -- . "${ignore_files[@]}" "${ignore_file_ui_bindata}" | awk '{print "- " $0}'
echo -e "\nDiff:"
git --no-pager diff HEAD -- . "${ignore_file}" "${ignore_file_ui_bindata}"
git --no-pager diff HEAD -- . "${ignore_files[@]}" "${ignore_file_ui_bindata}"
exit 1
else
echo "OK"
Expand All @@ -33,7 +34,7 @@ echo "#############################"
echo "Verify make package-vendir-sync..."
echo "#############################"
make package-vendir-sync
if ! (git diff --quiet HEAD -- . "${ignore_file}" "${ignore_file_ui_bindata}"); then
if ! (git diff --quiet HEAD -- . "${ignore_files[@]}" "${ignore_file_ui_bindata}"); then
echo "FAIL"
echo "'make package-vendir-sync' generated diffs!"
echo "Please verify if package CRD changes are intended and commit the diffs if so."
Expand All @@ -48,7 +49,7 @@ echo "#############################"
echo "Verify make configure-bom..."
echo "#############################"
make configure-bom
if ! (git diff --quiet HEAD -- . "${ignore_file}" "${ignore_file_ui_bindata}"); then
if ! (git diff --quiet HEAD -- . "${ignore_files[@]}" "${ignore_file_ui_bindata}"); then
echo "FAIL"
echo "'make configure-bom' generated diffs!"
echo "Please verify if default BOM variable changes are intended and commit the diffs if so."
Expand Down

0 comments on commit 63e05d5

Please # to comment.