-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
178 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pushd `dirname "${BASH_SOURCE[0]}"` > /dev/null | ||
source "./config.sh" | ||
|
||
pushd "$ROOT" | ||
|
||
LEIN_VERSION=`cat "$PROJECT_FILE" | grep "defproject" | cut -d' ' -f3 | cut -d\" -f2` | ||
|
||
# same version must be in src/version.clj | ||
|
||
PROJECT_VERSION=`cat "$PROJECT_VERSION_FILE" | grep "(def current-version" | cut -d" " -f3 | cut -d\" -f2` | ||
if [ -z "$PROJECT_VERSION" ] ; then | ||
echo "Unable to retrieve 'current-version' string from '$PROJECT_VERSION_FILE'" | ||
popd | ||
exit 1 | ||
fi | ||
|
||
if [ ! "$LEIN_VERSION" = "$PROJECT_VERSION" ] ; then | ||
echo "Lein's project.clj version differs from version in '$PROJECT_VERSION_FILE': '$LEIN_VERSION' != '$PROJECT_VERSION'" | ||
popd | ||
exit 2 | ||
fi | ||
|
||
echo "All version strings are consistent: '$LEIN_VERSION'" | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
pushd() { | ||
pushd () { | ||
command pushd "$@" > /dev/null | ||
} | ||
|
||
popd() { | ||
popd () { | ||
command popd "$@" > /dev/null | ||
} | ||
|
||
pushd . | ||
pushd `dirname "${BASH_SOURCE[0]}"` | ||
|
||
cd "$(dirname"${BASH_SOURCE[0]}")"; | ||
cd .. | ||
|
||
ROOT=`pwd` | ||
PROJECT_FILE="project.clj" | ||
PROJECT_VERSION_FILE="src/lib/chromex/version.clj" | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pushd `dirname "${BASH_SOURCE[0]}"` > /dev/null | ||
source "./config.sh" | ||
|
||
pushd "$ROOT" | ||
|
||
./scripts/list-jar.sh | ||
|
||
LEIN_VERSION=`cat "$PROJECT_FILE" | grep "defproject" | cut -d' ' -f3 | cut -d\" -f2` | ||
|
||
# http://stackoverflow.com/a/1885534/84283 | ||
echo "Are you sure to publish version ${LEIN_VERSION}? [Yy]" | ||
read -n 1 -r | ||
if [[ "$REPLY" =~ ^[Yy]$ ]]; then | ||
lein with-profile lib deploy clojars | ||
else | ||
exit 1 | ||
fi | ||
|
||
popd | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pushd `dirname "${BASH_SOURCE[0]}"` > /dev/null | ||
source "./config.sh" | ||
|
||
pushd "$ROOT" | ||
|
||
./scripts/check-versions.sh | ||
|
||
LEIN_VERSION=`cat "$PROJECT_FILE" | grep "defproject" | cut -d' ' -f3 | cut -d\" -f2` | ||
|
||
JAR_FILE="target/chromex-$LEIN_VERSION.jar" | ||
|
||
echo "listing content of $JAR_FILE" | ||
echo "" | ||
|
||
unzip -l "$JAR_FILE" | ||
|
||
echo "" | ||
echo "----------------------------" | ||
echo "" | ||
|
||
popd | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pushd `dirname "${BASH_SOURCE[0]}"` > /dev/null | ||
source "./config.sh" | ||
|
||
pushd "$ROOT" | ||
|
||
./scripts/list-jar.sh | ||
|
||
lein with-profile lib install | ||
|
||
popd | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
pushd `dirname "${BASH_SOURCE[0]}"` > /dev/null | ||
source "./config.sh" | ||
|
||
pushd "$ROOT" | ||
|
||
lein with-profile lib jar | ||
|
||
popd | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
# updates all version strings | ||
|
||
set -e | ||
|
||
pushd `dirname "${BASH_SOURCE[0]}"` > /dev/null | ||
source "./config.sh" | ||
|
||
pushd "$ROOT" | ||
|
||
VERSION=$1 | ||
|
||
if [ -z "$VERSION" ] ; then | ||
echo "please specify version as the first argument" | ||
popd | ||
exit 1 | ||
fi | ||
|
||
sed -i -e "s/defproject binaryage\/chromex \".*\"/defproject binaryage\/chromex \"$VERSION\"/g" "$PROJECT_FILE" | ||
sed -i -e "s/def current-version \".*\"/def current-version \"$VERSION\"/g" "$PROJECT_VERSION_FILE" | ||
|
||
# this is just a sanity check | ||
./scripts/check-versions.sh | ||
|
||
popd | ||
|
||
popd |