From aa4c70c113df667882b1fb311ed89af48c7dd40d Mon Sep 17 00:00:00 2001 From: cprudhom Date: Thu, 23 Oct 2014 11:29:36 +0200 Subject: [PATCH 1/2] Update project to compile with Choco-solver-3.2.1 + add release.sh --- pom.xml | 8 +--- src/main/bash/release.sh | 47 +++++++++++++++++++ .../constraints/nary/geost/PropGeost.java | 9 +--- 3 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 src/main/bash/release.sh diff --git a/pom.xml b/pom.xml index 6012f9e..deb2662 100644 --- a/pom.xml +++ b/pom.xml @@ -26,7 +26,7 @@ choco choco-solver - 3.2.1-SNAPSHOT + 3.2.1 org.testng @@ -44,15 +44,11 @@ slf4j-api 1.7.7 - - ch.qos.logback - logback-core - 1.1.2 - ch.qos.logback logback-classic 1.1.2 + test diff --git a/src/main/bash/release.sh b/src/main/bash/release.sh new file mode 100644 index 0000000..8486d2f --- /dev/null +++ b/src/main/bash/release.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +function getVersionToRelease() { + CURRENT_VERSION=`mvn ${MVN_ARGS} org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v "\[INFO\]"` + echo ${CURRENT_VERSION%%-SNAPSHOT} +} + +function guess() { + v=$1 + echo "${v%.*}.$((${v##*.}+1))-SNAPSHOT" +} + + +VERSION=$(getVersionToRelease) +NEXT=$(guess $VERSION) +TAG="choco-geost-${VERSION}" + +git fetch +git checkout -b release + +mvn versions:set -DnewVersion=${VERSION} -DgenerateBackupPoms=false +git commit -m "initiate release ${VERSION}" -a + +COMMIT=$(git rev-parse HEAD) + +git ls-remote --exit-code --tags origin ${TAG} + +## MASTER +git checkout master +git merge --no-ff ${COMMIT} +git tag ${TAG} +git push --tags +git pull origin master +git push origin master + +## DEVELOP +git checkout develop +git merge --no-ff ${TAG} +mvn versions:set -DnewVersion=${NEXT} -DgenerateBackupPoms=false +git commit -m "Prepare the code for the next version" -a +git push origin develop +git push --all && git push --tags +git push origin --delete release + +git checkout $TAG +mvn clean install -DskipTests +git checkout develop \ No newline at end of file diff --git a/src/main/java/solver/constraints/nary/geost/PropGeost.java b/src/main/java/solver/constraints/nary/geost/PropGeost.java index 92210e7..5dfa7f9 100644 --- a/src/main/java/solver/constraints/nary/geost/PropGeost.java +++ b/src/main/java/solver/constraints/nary/geost/PropGeost.java @@ -42,8 +42,8 @@ import solver.propagation.IPropagationEngine; import solver.propagation.NoPropagationEngine; import solver.search.solution.Solution; -import solver.variables.EventType; import solver.variables.IntVar; +import solver.variables.events.IntEventType; import util.ESat; import java.util.HashMap; @@ -163,7 +163,7 @@ public PropGeost(IntVar[] vars, int k, List objects, List Date: Thu, 23 Oct 2014 11:30:18 +0200 Subject: [PATCH 2/2] initiate release 3.2.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index deb2662..4a5b133 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ choco choco-geost - 3.2.1-SNAPSHOT + 3.2.1 jar Geost constraint, developped for Choco3