From 2afff0a6b900ecaf6437adcacbd6730975762de0 Mon Sep 17 00:00:00 2001 From: cprudhom Date: Mon, 9 Sep 2024 16:03:21 +0200 Subject: [PATCH] Prepare the code for the next version --- CHANGES.md | 15 ++++++++++ examples/pom.xml | 2 +- parsers/pom.xml | 2 +- pom.xml | 2 +- scripts/release.sh | 63 +++++++++--------------------------------- scripts/set_version.sh | 4 +-- solver/pom.xml | 2 +- 7 files changed, 34 insertions(+), 56 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5e9ca684a4..39c19da580 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,21 @@ Choco Solver ChangeLog This file is dedicated to sum up the new features added and bugs fixed in Choco-solver since the version, 4.0.0. **Note**: double-space is replaced by "\t" character on release process. Make sure the format is ok. +NEXT MILESTONE +--------------------- + +### Major features: + +### Deprecated API (to be removed in next release): + +### Other closed issues and pull requests: +See [milestone 4.10.16](https://github.com/chocoteam/choco-solver/milestone/xx) + +#### Contributors to this release: + + +**Full Changelog**: https://github.com/chocoteam/choco-solver/compare/v4.10.15...v4.10.16 + 4.10.15 - 09 Sep 2024 ------------------- diff --git a/examples/pom.xml b/examples/pom.xml index ba744d824c..3f114c499c 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -17,7 +17,7 @@ org.choco-solver choco - 4.10.15 + 4.10.16-SNAPSHOT examples jar diff --git a/parsers/pom.xml b/parsers/pom.xml index 888e279f47..c041cde5f9 100644 --- a/parsers/pom.xml +++ b/parsers/pom.xml @@ -17,7 +17,7 @@ org.choco-solver choco - 4.10.15 + 4.10.16-SNAPSHOT choco-parsers jar diff --git a/pom.xml b/pom.xml index 68694482c7..3185694727 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ 4.0.0 org.choco-solver choco - 4.10.15 + 4.10.16-SNAPSHOT pom choco http://choco-solver.org/ diff --git a/scripts/release.sh b/scripts/release.sh index f68401141c..89a00a6527 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -11,28 +11,31 @@ function getVersionToRelease() { set -ex VERSION=$(getVersionToRelease) -git checkout master || quit "unable to check master out" -git pull --rebase origin master || quit "unable to pull master" +git checkout -b release-${VERSION} develop || quit "unable to check release-${VERSION} out" #Establish the version, maven side, misc. side ./scripts/set_version.sh ${VERSION} mvn license:format -q || quit "unable to update license" git commit -m "initiate release ${VERSION}" -a || quit "unable to commit last changes" -git push origin master || quit "unable to push on master" +git checkout master || quit "unable to check master out" +git merge --no-ff release-${VERSION} || quit "unable to merge release-${VERSION} into master" +git push origin master || quit "Unable to push the tag ${VERSION}" # add new tag -#Quit if tag already exists -git ls-remote --exit-code --tags origin v${VERSION} && quit "tag ${VERSION} already exists" +# #Quit if tag already exists +# git ls-remote --exit-code --tags origin v${VERSION} && quit "tag ${VERSION} already exists" # We assume the tests have been run before, and everything is OK for the release - # add the tag git tag -a v${VERSION} -m "create tag ${VERSION}" || quit "Unable to tag with ${VERSION}" git push --tags || quit "Unable to push the tag ${VERSION}" - # Proceed to the deployment mvn -P ossrhDeploy javadoc:jar source:jar deploy -DskipTests -B -U ||quit "Unable to deploy to master" +## Merge back to develop +git checkout develop || quit "unable to check develop out" +git merge --no-ff release-${VERSION} || quit "unable to merge release-${VERSION} into develop" + #Set the next development version echo "** Prepare master for the next version **" ./scripts/set_version.sh --next ${VERSION} @@ -46,47 +49,7 @@ then fi #Push changes on develop, with the tag -git push origin master ||quit "Unable to push to master" +git push origin develop ||quit "Unable to push to master" -## Package the current version -#GH_API="https://api.github.com/repos/chocoteam/choco-solver/" -#GH_UPL="https://uploads.github.com/repos/chocoteam/choco-solver/" -# -#AUTH="Authorization: token ${GH_TOKEN}" -# -## Validate token. -#curl -o /dev/null -i -sH "${AUTH}" "${GH_API}releases" || quit "Error: Invalid repo, token or network issue!"; -# -## prepare release comment -# -##find position of release separator in CHANGES.md, only keep the 2nd and 3rd -#temp_file="tmpreadme.json" -#$(touch ${temp_file}) || quit "Unable to create tmp file" -# -## extract release comment -#extractReleaseComment ${VERSION} ${temp_file} || quit "Unable to extract release comment" -# -## create release -#response=$(curl -i -sH "$AUTH" --data @${temp_file} "${GH_API}releases") || quit "Unable to create the release" -# -## get the asset id -#ID=$(echo "$response" | grep -m 1 "id.:"| tr : = | tr -cd '[[:alnum:]]=') || quit "Error: Failed to get release id for tag: ${VERSION}"; echo "$response" | awk 'length($0)<100' >&2 -#ID=(${ID//=/ }) || quit "Error: Unable to split id: ${ID}" -#id=${ID[1]} || quit "Error: Unable to get id: ${ID}" -# -## add asset -#curl -i -sH "$AUTH" -H "Content-Type: application/zip" \ -# -data-binary @choco-${VERSION}.zip \ -# "${GH_UPL}/releases/${id}/assets?name=choco-${VERSION}.zip" \ -# || quit "Unable to add asset" -# -# -## create the next milestone -#NEXT=$(echo "${VERSION%.*}.$((${VERSION##*.}+1))") || quit "Unable to get next release number" -#curl -i -sH "$AUTH" --data '{ "title": '\""${NEXT}"\"'}' "${GH_API}milestones" -# -#if [ -d choco-${VERSION} ]; then -# rm -Rf choco-${VERSION} || quit "Unable to remove choco-${VERSION} dir" -#fi -##rm choco-${VERSION}.zip -#rm ${temp_file} || quit "Unable to remove tmp file" +# Delete the release branch +git branch -d release-${VERSION} || quit "Unable to delete release-${VERSION} branch" diff --git a/scripts/set_version.sh b/scripts/set_version.sh index 5900a750c0..d0176b357c 100755 --- a/scripts/set_version.sh +++ b/scripts/set_version.sh @@ -69,7 +69,7 @@ See [milestone '${VERSION%%-SNAPSHOT}'](https://github.com/chocoteam/choco-solve \ #### Contributors to this release:\ \ - -**Full Changelog**: https://github.com/chocoteam/choco-solver/compare/v${OVERSION}...v${VERSION%%-SNAPSHOT} +\ +**Full Changelog**: https://github.com/chocoteam/choco-solver/compare/v'${OVERSION}'...v'${VERSION%%-SNAPSHOT}' ' CHANGES.md fi diff --git a/solver/pom.xml b/solver/pom.xml index 7b4b53e3b2..693d2f3301 100644 --- a/solver/pom.xml +++ b/solver/pom.xml @@ -17,7 +17,7 @@ org.choco-solver choco - 4.10.15 + 4.10.16-SNAPSHOT choco-solver jar