#!/bin/bash

CURRENT_VERSION=$1
SNAPSHOT_VERSION=$2

if [ "$CURRENT_VERSION" = "" ] || [ "$SNAPSHOT_VERSION" = "" ] ; then
   echo "Usage: bin/bump 2.9.7 2.9.8-SNAPSHOT"
   exit 1
fi

for f in bin/lein bin/lein-pkg bin/lein.bat bin/lein.ps1 project.clj leiningen-core/project.clj; do
    sed -i s/$CURRENT_VERSION/$SNAPSHOT_VERSION/ $f
done
