on main help sign in
fix: remove
commit75d920b3497a4f78c5c0a9a1b6fd108c9cfcfc3c authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com> dateFri 20 Jun 2025, 11:39 (1 year ago) parent9cd8572
1 file changed−43
scripts/release−43
scripts/releasedeleted−43
@@ -1,43 +0,0 @@
1−#!/usr/bin/env bash
2−
3−# Parse command line arguments
4−minor=false
5−while [ "$#" -gt 0 ]; do
6− case "$1" in
7− --minor) minor=true; shift 1;;
8− *) echo "Unknown parameter: $1"; exit 1;;
9− esac
10−done
11−
12−git fetch --force --tags
13−
14−# Get the latest Git tag
15−latest_tag=$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1)
16−
17−# If there is no tag, exit the script
18−if [ -z "$latest_tag" ]; then
19− echo "No tags found"
20− exit 1
21−fi
22−
23−echo "Latest tag: $latest_tag"
24−
25−# Split the tag into major, minor, and patch numbers
26−IFS='.' read -ra VERSION <<< "$latest_tag"
27−
28−if [ "$minor" = true ]; then
29− # Increment the minor version and reset patch to 0
30− minor_number=${VERSION[1]}
31− let "minor_number++"
32− new_version="${VERSION[0]}.$minor_number.0"
33−else
34− # Increment the patch version
35− patch_number=${VERSION[2]}
36− let "patch_number++"
37− new_version="${VERSION[0]}.${VERSION[1]}.$patch_number"
38−fi
39−
40−echo "New version: $new_version"
41−
42−git tag $new_version
43−git push --tags