Commit 5dcd1c80 authored by Roque's avatar Roque

Ebulk version command

parent 538e7037
...@@ -6,7 +6,8 @@ DOWN_URL="$DATA_LAKE_URL/" ...@@ -6,7 +6,8 @@ DOWN_URL="$DATA_LAKE_URL/"
ING_POLICY="portal_ingestion_policies/default_embulk" ING_POLICY="portal_ingestion_policies/default_embulk"
ING_URL="$DATA_LAKE_URL$ING_POLICY" 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_DATA_PATH=~/.ebulk
EBULK_DATASET_FILE_NAME="/.ebulk_dataset" EBULK_DATASET_FILE_NAME="/.ebulk_dataset"
DATASET_REPORT_FILE_NAME="/.dataset-task-report" DATASET_REPORT_FILE_NAME="/.dataset-task-report"
...@@ -393,7 +394,7 @@ function checkSoftware { ...@@ -393,7 +394,7 @@ function checkSoftware {
if ! checkCurl; then if ! checkCurl; then
return 1 return 1
fi 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 chmod +x $embulk
if hash $embulk 2>/dev/null; then if hash $embulk 2>/dev/null; then
echo "[INFO] Done. Embulk successfully installed." echo "[INFO] Done. Embulk successfully installed."
...@@ -403,7 +404,7 @@ function checkSoftware { ...@@ -403,7 +404,7 @@ function checkSoftware {
echo echo
echo "[INFO] Plase, try manual installation. Run:" echo "[INFO] Plase, try manual installation. Run:"
echo 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 "chmod +x ~/.embulk/bin/embulk"
echo -e "echo 'export PATH=\"\$HOME/.embulk/bin:\$PATH\"' >> ~/.bashrc" echo -e "echo 'export PATH=\"\$HOME/.embulk/bin:\$PATH\"' >> ~/.bashrc"
echo "source ~/.bashrc" echo "source ~/.bashrc"
...@@ -412,9 +413,9 @@ function checkSoftware { ...@@ -412,9 +413,9 @@ function checkSoftware {
else else
version=$($embulk --version 2>&1 | awk -F ' ' '/embulk/ {print $2}') version=$($embulk --version 2>&1 | awk -F ' ' '/embulk/ {print $2}')
echo "[INFO] Current embulk version: "$version"" echo "[INFO] Current embulk version: "$version""
if [[ "$version" < "$EBULK_VERSION" ]]; then if [[ "$version" < "$EMBULK_VERSION" ]]; then
echo "Your embulk version is too old. Upgrading embulk to version $EBULK_VERSION" echo "Your embulk version is too old. Upgrading embulk to version $EMBULK_VERSION"
$embulk selfupdate $EBULK_VERSION $embulk selfupdate $EMBULK_VERSION
fi fi
fi fi
...@@ -610,6 +611,9 @@ while [ "$1" != "" ]; do ...@@ -610,6 +611,9 @@ while [ "$1" != "" ]; do
-h | --help ) cat $TOOL_PATH/help.md -h | --help ) cat $TOOL_PATH/help.md
exit exit
;; ;;
-v | --version ) echo "ebulk $EBULK_VERSION"
exit
;;
-e | --examples ) cat $TOOL_PATH/example.md -e | --examples ) cat $TOOL_PATH/example.md
exit 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