1.0.6 • Published 2 years ago

@michaellinhardt/helpers v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Helpers

Installation and Setup

Clone the repository and install dependencies

git clone https://github.com/michaellinhardt/npm-backend-helpers/ && cd npm-backend-helpers && npm install

Set up the Git pre-push hook

This project uses a Git pre-push hook to automatically increment the patch version in package.json before each push.

To set up the hook, create a file named pre-push in the .git/hooks directory of your local repository:

touch .git/hooks/pre-push

Add the following line to the file pre-push:

# Get the name of the current branch
current_branch=$(git symbolic-ref --short HEAD)

# Only run npm version patch if the current branch is main
if [ "$current_branch" = "main" ]; then
  npm version patch -m "Auto bump version to %s - pre-push hook"
fi```

Save and close the file.

Finally, make the pre-push file executable:

```chmod +x .git/hooks/pre-push```
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago