Skip to content

build(release): update the pre-commit config and hook version with tag release#312

Open
umarhussain15 wants to merge 2 commits into
norwoodj:masterfrom
umarhussain15:update-release-script
Open

build(release): update the pre-commit config and hook version with tag release#312
umarhussain15 wants to merge 2 commits into
norwoodj:masterfrom
umarhussain15:update-release-script

Conversation

@umarhussain15

Copy link
Copy Markdown

Resolves the issue: #222
build(release): update the pre-commit config and hook version with tag release

This change will also ensure that helm-docs-container hook has the published docker image tag instead of latest.

Workflow:

  • Locally run scripts/release <version> to prepare the commit with the release tag
  • The commit will contain modified pre-commit config and hook file
  • Push the commit with tag to remote
  • The github workflow will be triggered for the pushed tag and release the docker image

Example diff after running the scripts/release <version>:

--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
 repos:
   - repo: https://github.com/norwoodj/helm-docs
-    rev: v1.14.2
+    rev: v1.51.1
--- a/.pre-commit-hooks.yaml
+++ b/.pre-commit-hooks.yaml
 - id: helm-docs-container
   args: []
   description: Uses the container image of 'helm-docs' to create documentation from the Helm chart's 'values.yaml' file, and inserts the result into a corresponding 'README.md' file.
-  entry: jnorwood/helm-docs:latest
+  entry: jnorwood/helm-docs:v1.51.1

release

This change will also ensure that helm-docs-container hook has the
published docker image tag instead of latest.
Comment thread scripts/release Outdated
echo "Release version must be of the form 'v1.2.3'"
exit 1
fi
go install github.com/mikefarah/yq/v4@latest # Install yq via go

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you instead add this as an instruction to the README to install this before performing a release? Then remove this, I don't want to try to install this everytime I do a release.

Otherwise looks good!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a command -v yq in the script and let user know if it's missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants