File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -156,13 +156,20 @@ assign_positional_args 1 "${_positionals[@]}"
156156set -e
157157tagname=sscg-${_arg_version}
158158
159+ # Make sure the working directory is clean
160+ git diff --quiet HEAD --exit-code || ( echo " Working directory is dirty" && exit 2 )
161+
159162# Make sure we are on the release branch
160163git checkout main || ( echo " Unable to switch to main branch" && exit 2 )
161164
162165# Fetch tags and make sure that the provided version is not already among them
163166git fetch --tags
164167git tag -v ${tagname} > /dev/null 2>&1 && ( echo " Tag '${tagname} ' is already in use!" && exit 1 )
165168
169+ # Update the version in meson.build
170+ meson rewrite kwargs set project / version ${_arg_version}
171+ git diff --quiet HEAD --exit-code || git commit -sam " Updating version to ${_arg_version} "
172+
166173# Tag the new release
167174git tag -sm " Releasing SSCG ${_arg_version} " ${tagname} ${_arg_commitish}
168175
You can’t perform that action at this time.
0 commit comments