<commit_before>#!/bin/bash
 
# Script based on suggestions from: https://gist.github.com/nwinkler/9213085
# See README.md in this script's folder for attribution and reasoning.

#Switch to the script's directory regardless of the path the script was invoked from
cd $(dirname $0);

source ../shared/shared.sh;

prelude="[RELEASE]";

function performRelease {
	echo "${prelude} Performing release...";

	echo "${prelude} You provided: '$releaseVersion' -> '$developmentVersion' with '$scmCommentPrefix'";
	
	# Create a new release branch from develop
	git checkout -b release/$releaseVersion develop
 
	# Perform Maven release in batch mode 
	mvn --batch-mode release:prepare release:perform -DscmCommentPrefix="$scmCommentPrefix" -DreleaseVersion=$releaseVersion -DdevelopmentVersion=$developmentVersion
 
	# Merge the new release + snapshot version commits back into develop
	git checkout develop
	git merge --no-ff -m "$scmCommentPrefix Merge release/$releaseVersion into develop" release/$releaseVersion

	# Merge the new release but NOT the snapshot version commits back into develop
	git checkout master
	git merge --no-ff -m "$scmCommentPrefix Merge previous version into master to avoid the increased version number" release/$releaseVersion~1

	# Remove the release branch that was created
	git branch -D release/$releaseVersion

	# Switch back to the develop branch
	git checkout develop

	# Push changes manually
	git push --all && git push --tags

	echo "${prelude} Release performed.";
}

# The version to be released
echo "${prelude} Type the version to release (e.g.: 0.6.0) and press [ENTER]: "
read releaseVersion;

# The next development version
echo "${prelude} Type the development version to switch to after release (e.g.: 0.6.1-SNAPSHOT) and press [ENTER]: "
read developmentVersion;

# Release comment prefix
echo "${prelude} Type the release comment prefix for the release (e.g.: issue-18: Release 0.6.0) and press [ENTER]: "
read scmCommentPrefix;

echo "${prelude} You provided: '$releaseVersion' -> '$developmentVersion' with '$scmCommentPrefix'";
while true; do
    read -p "${prelude} Is this correct? [y/n]: " performRelease;<commit_msg>Refactoring to separate artifacts. * choosing release version;<commit_after>#!/bin/bash
 
# Script based on suggestions from: https://gist.github.com/nwinkler/9213085
# See README.md in this script's folder for attribution and reasoning.

#Switch to the script's directory regardless of the path the script was invoked from
cd $(dirname $0);

source ../shared/shared.sh;

prelude="[RELEASE]";

function performRelease {
	echo "${prelude} Performing release...";

	echo "${prelude} You provided: '$releaseVersion' -> '$developmentVersion' with '$scmCommentPrefix'";
	
	# Create a new release branch from develop
	git checkout -b release/$releaseVersion develop
 
	# Perform Maven release in batch mode 
	mvn --batch-mode release:prepare release:perform -DscmCommentPrefix="$scmCommentPrefix" -DreleaseVersion=$releaseVersion -DdevelopmentVersion=$developmentVersion
 
	# Merge the new release + snapshot version commits back into develop
	git checkout develop
	git merge --no-ff -m "$scmCommentPrefix Merge release/$releaseVersion into develop" release/$releaseVersion

	# Merge the new release but NOT the snapshot version commits back into develop
	git checkout master
	git merge --no-ff -m "$scmCommentPrefix Merge previous version into master to avoid the increased version number" release/$releaseVersion~1

	# Remove the release branch that was created
	git branch -D release/$releaseVersion

	# Switch back to the develop branch
	git checkout develop

	# Push changes manually
	git push --all && git push --tags

	echo "${prelude} Release performed.";
}

# The version to be released
echo "${prelude} Type the version to release (e.g.: 0.7.0) and press [ENTER]: "
read releaseVersion;

# The next development version
echo "${prelude} Type the development version to switch to after release (e.g.: 0.7.0-SNAPSHOT) and press [ENTER]: "
read developmentVersion;

# Release comment prefix
echo "${prelude} Type the release comment prefix for the release (e.g.: issue-18: Release 0.7.0) and press [ENTER]: "
read scmCommentPrefix;

echo "${prelude} You provided: '$releaseVersion' -> '$developmentVersion' with '$scmCommentPrefix'";
while true; do
    read -p "${prelude} Is this correct? [y/n]: " performRelease;
{'fraction_non_alphanumeric': 0.0997944736241151, 'fraction_numerical': 0.009134505594884677, 'mean_word_length': 4.755584756898817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1769640', 'n_tokens_mistral': 1265, 'n_tokens_neox': 1183, 'n_words': 499}