Skip to content

Commit

Permalink
Bump version to 0.4.12
Browse files Browse the repository at this point in the history
  • Loading branch information
timbastin committed Jun 20, 2024
1 parent b3e6df7 commit 64208c9
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions bump_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright (C) 2024 Tim Bastin, l3montree UG (haftungsbeschränkt)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

#!/bin/bash

# Usage: ./bump_version.sh patch|minor|major

if [ -z "$1" ]; then
echo "No version bump type provided. Usage: ./bump_version.sh patch|minor|major"
exit 1
fi

BUMP_TYPE=$1

# Extract current version from Chart.yaml
CURRENT_VERSION=$(grep '^version:' charts/flawfix/Chart.yaml | awk '{print $2}')
echo "Current version: $CURRENT_VERSION"

# Use semver tool to get the new version
NEW_VERSION=$(semver -i "$CURRENT_VERSION" "$BUMP_TYPE")
echo "New version: $NEW_VERSION"

# Update Chart.yaml with the new version
sed -i '' -e "s/version: .*/version: $NEW_VERSION/" charts/flawfix/Chart.yaml

# Commit and tag the new version
git add .
git commit -m "Bump version to $NEW_VERSION"
git tag "v$NEW_VERSION"
2 changes: 1 addition & 1 deletion charts/flawfix/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.11
version: 0.4.12

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down

0 comments on commit 64208c9

Please sign in to comment.