This content originally appeared on Go Make Things and was authored by Go Make Things
Last month, I did some testing on Kelp’s performance and found that because compression algorithms rely on repeated patterns, smaller modular files reduce the effectiveness of gzip and brotli.
Based on this, I’m release two versions of Kelp: a pre-bundled version and one with modular files.
Rather than trying to remember to…
- Bump the version,
- Run the build,
- Then add and push the files…
I decided to create a little bash script to automate the process.
You can update the version in your package.json
file by running…
npm version <major|minor|patch>
You can get the name of the current branch by running this in Terminal…
git branch --show-current
I combined that with my regular git add
and git push
commands into a release.sh
file…
BRANCH=`git branch --show-current`
npm --no-git-tag-version version $1 && npm run build && git add . && git commit -a -m "bundle for release" && git push origin ${BRANCH} && git open
I can run it like this…
sh release.sh minor
That will make a minor version increase, run my build process (I’m using ESBuild), add the new build files, commit them for release, and push them to my current branch.
I also have git-open by Paul Irish installed, and this runs that command to open GitHub so I can create a new PR.
Like this? A Lean Web Club membership is the best way to support my work and help me create more free content.
This content originally appeared on Go Make Things and was authored by Go Make Things

Go Make Things | Sciencx (2025-07-21T14:30:00+00:00) How to automatically create a release for a pull request using a bash script. Retrieved from https://www.scien.cx/2025/07/21/how-to-automatically-create-a-release-for-a-pull-request-using-a-bash-script/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.