Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@henriquehbr/tagit
Advanced tools
A git tag bumper that strictly follows semver
You can use your package manager of choice (npm, yarn or pnpm), but in this example i'll be using pnpm:
pnpm i -g @henriquehbr/tagit
Usage: tagit [options] <version>
A git tag bumper that strictly follows semver
Options:
-p <alpha|beta|rc|stable>
Create a pre-release using any of the valid identifiers
(note: "stable" is used when leaving from pre-release versions to a official release)
-f, --force-version <version>
Use the specified version on the release
-v, --version
Displays the current version of tagit
-h
Displays help about using this command
tagit
through DockerIn order to make a release on your project, run:
docker run \
--rm \
-t \
-v $(PWD):/repo \
-e GIT_NAME="$(git config user.name)" \
-e GIT_EMAIL="$(git config user.email)" \
henriquehbr/tagit:latest
Your Git name and email are required in order to make the release commit
tagit
When using this method, the positional parameters passed at the end of the
docker run
command will be received by the release script inside the
container, in order to pass parameters directly to the tagit
CLI, you must
assign them to the TAGIT_FLAGS
environment variable, like on the example
below:
docker run \
--rm \
-t \
-v $(PWD):/repo \
-e GIT_NAME="$(git config user.name)" \
-e GIT_EMAIL="$(git config user.email)" \
-e TAGIT_FLAGS="-p beta" \
henriquehbr/tagit:latest
The command above simply instructs tagit to use beta
as it's pre-release
identifier
If your project requires an extra action before the release, for example,
bumping the version on a version.txt
file, you can create a callback script
for that, example below:
#!/bin/sh
version=$1
echo "$version" > version.txt
The new version is passed as the first parameter to the script (
$1
)
After that, remember to mark the callback script as executable, and specify it
as a parameter when running the tagit
container:
docker run \
--rm \
-t \
-v $(PWD):/repo \
-e GIT_NAME="$(git config user.name)" \
-e GIT_EMAIL="$(git config user.email)" \
henriquehbr/tagit:latest \
./before-release
If the callback script is not available on your repository like on the example above, you can make it available through Docker mounted volumes
By default, the henriquehbr/tagit
Docker image available on Docker Hub only
comes with a bare minimum set of tools required to make a release, those being:
nodejs
- to run tagit
git
- to make the release commitsgit-cliff
- to generate changelogsThat means if you need anything else like npm
for bumping the version
field
of package.json
on your callback release script (assuming you're working on a
Node.js project, for example) you'll need to extend the Docker image to include
the packages and binaries for your specific use case
The example below shows a Dockerfile
that extends henriquehbr/tagit
and
installs npm
over it:
FROM henriquehbr/tagit:latest
USER root
RUN apk add --no-cache npm
USER tagit
Remember that it's strongly recommended to switch back to the
tagit
user after performing operations that requires superuser permissions
And build it with the command below:
docker build --build-arg HOST_USER_UID=$(id -u) -t release .
The host user id is required to give permission to the container user over the repository files
Customized containers can be launched using the exact same
parameters of the default
henriquehbr/tagit
container
FAQs
A git tag bumper that strictly follows semver
We found that @henriquehbr/tagit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.