Commit 5dcd1c80 authored by Roque's avatar Roque

Ebulk version command

parent 538e7037
......@@ -6,7 +6,8 @@ DOWN_URL="$DATA_LAKE_URL/"
ING_POLICY="portal_ingestion_policies/default_embulk"
ING_URL="$DATA_LAKE_URL$ING_POLICY"
EBULK_VERSION="0.9.7"
EBULK_VERSION="1.1.3"
EMBULK_VERSION="0.9.7"
EBULK_DATA_PATH=~/.ebulk
EBULK_DATASET_FILE_NAME="/.ebulk_dataset"
DATASET_REPORT_FILE_NAME="/.dataset-task-report"
......@@ -393,7 +394,7 @@ function checkSoftware {
if ! checkCurl; then
return 1
fi
curl --create-dirs -o $embulk -L "https://dl.bintray.com/embulk/maven/embulk-$EBULK_VERSION.jar"
curl --create-dirs -o $embulk -L "https://dl.bintray.com/embulk/maven/embulk-$EMBULK_VERSION.jar"
chmod +x $embulk
if hash $embulk 2>/dev/null; then
echo "[INFO] Done. Embulk successfully installed."
......@@ -403,7 +404,7 @@ function checkSoftware {
echo
echo "[INFO] Plase, try manual installation. Run:"
echo
echo 'curl --create-dirs -o ~/.embulk/bin/embulk -L "https://dl.bintray.com/embulk/maven/embulk-$EBULK_VERSION.jar"'
echo 'curl --create-dirs -o ~/.embulk/bin/embulk -L "https://dl.bintray.com/embulk/maven/embulk-$EMBULK_VERSION.jar"'
echo "chmod +x ~/.embulk/bin/embulk"
echo -e "echo 'export PATH=\"\$HOME/.embulk/bin:\$PATH\"' >> ~/.bashrc"
echo "source ~/.bashrc"
......@@ -412,9 +413,9 @@ function checkSoftware {
else
version=$($embulk --version 2>&1 | awk -F ' ' '/embulk/ {print $2}')
echo "[INFO] Current embulk version: "$version""
if [[ "$version" < "$EBULK_VERSION" ]]; then
echo "Your embulk version is too old. Upgrading embulk to version $EBULK_VERSION"
$embulk selfupdate $EBULK_VERSION
if [[ "$version" < "$EMBULK_VERSION" ]]; then
echo "Your embulk version is too old. Upgrading embulk to version $EMBULK_VERSION"
$embulk selfupdate $EMBULK_VERSION
fi
fi
......@@ -610,6 +611,9 @@ while [ "$1" != "" ]; do
-h | --help ) cat $TOOL_PATH/help.md
exit
;;
-v | --version ) echo "ebulk $EBULK_VERSION"
exit
;;
-e | --examples ) cat $TOOL_PATH/example.md
exit
;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment