Skip to content

Commit

Permalink
fix version for standalone script
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhupesh-V committed Jul 18, 2020
1 parent c6dd194 commit 86ef174
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dotman.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ IFS=$'\n'

set +x

VERSION="v0.1.0"
DOTMAN_LOGO=$(cat << "LOGO"
_ _
Expand Down Expand Up @@ -255,10 +256,14 @@ init_check() {


if [[ $1 == "version" || $1 == "--version" || $1 == "-v" ]]; then
latest_tag=$(git describe --tags --abbrev=0)
latest_tag_push=$(git log -1 --format=%ai "${latest_tag}")
echo -e "${BOLD}dotman ${latest_tag} ${RESET}"
echo -e "Pushed at: ${BOLD}${latest_tag_push}${RESET}"
if [[ -d "$HOME/dotman" ]]; then
latest_tag=$(git -C "$HOME/dotman" describe --tags --abbrev=0)
latest_tag_push=$(git -C "$HOME/dotman" log -1 --format=%ai "${latest_tag}")
echo -e "${BOLD}dotman ${latest_tag} ${RESET}"
echo -e "Released on: ${BOLD}${latest_tag_push}${RESET}"
else
echo -e "${BOLD}dotman ${VERSION}${RESET}"
fi
exit
fi

Expand Down
2 changes: 2 additions & 0 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ main () {
\__,_|\___/ \__|_| |_| |_|\__,_|_| |_|
.... is now installed
Run `dotman version` to check latest version.
Run `dotman` to configure first time setup.
EOF
Expand Down

0 comments on commit 86ef174

Please sign in to comment.