Skip to content

Commit

Permalink
Merge commit 'ccdecf8db43ffc101ad0dd0ac2977207be7baca6'
Browse files Browse the repository at this point in the history
  • Loading branch information
cprudhom committed Oct 23, 2014
2 parents 559d99e + ccdecf8 commit 4c154ce
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 14 deletions.
10 changes: 3 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>choco</groupId>
<artifactId>choco-geost</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.1</version>
<packaging>jar</packaging>
<name>Geost constraint, developped for Choco3</name>

Expand All @@ -26,7 +26,7 @@
<dependency>
<groupId>choco</groupId>
<artifactId>choco-solver</artifactId>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
Expand All @@ -44,15 +44,11 @@
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
</dependencies>

Expand Down
47 changes: 47 additions & 0 deletions src/main/bash/release.sh
Original file line number Diff line number Diff line change
@@ -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
9 changes: 2 additions & 7 deletions src/main/java/solver/constraints/nary/geost/PropGeost.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -163,7 +163,7 @@ public PropGeost(IntVar[] vars, int k, List<GeostObject> objects, List<ShiftedBo

@Override
protected int getPropagationConditions(int vIdx) {
return EventType.INT_ALL_MASK();
return IntEventType.ALL_EVENTS;
}

@Override
Expand All @@ -176,11 +176,6 @@ public void propagate(int evtmask) throws ContradictionException {
filter();
}

@Override
public void propagate(int idxVarInProp, int mask) throws ContradictionException {
forcePropagate(EventType.FULL_PROPAGATION);
}

@Override
public ESat isEntailed() {
if (isCompletelyInstantiated()) {
Expand Down

0 comments on commit 4c154ce

Please sign in to comment.