Skip to content

Commit

Permalink
fix: resolve open changelog on install/update (automotiveMastermind#44)
Browse files Browse the repository at this point in the history
* build(deps): bump handlebars from 4.1.2 to 4.7.1

Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.2 to 4.7.1.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/v4.7.1/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.1.2...v4.7.1)

Signed-off-by: dependabot[bot] <support@github.com>

* fix: resolve open changelog on install/update
* exit zero when open/browser not available

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Closes: automotiveMastermind#34, automotiveMastermind#43
  • Loading branch information
dmccaffery committed Jan 13, 2020
1 parent 938e4b1 commit f83efc4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
3 changes: 0 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ __am_prompt_update()
return 0
fi

local PROMPT_CHANGELOG_URI="https://github.com/automotivemastermind/prompt/blob/$PROMPT_COMMIT_REF/CHANGELOG.md"
local PROMPT_INSTALL_URI="https://github.com/automotiveMastermind/prompt/archive/$PROMPT_COMMIT_REF.tar.gz"
local PROMPT_INTALL_TEMP=$(mktemp -d)
local PROMPT_EXTRACT_TEMP="$PROMPT_INTALL_TEMP/extract"
Expand All @@ -94,8 +93,6 @@ __am_prompt_update()
popd 1>/dev/null

rm -rf $PROMPT_INTALL_TEMP 1>/dev/null

open-url $CHANGELOG_URI 1>/dev/null
}

__am_prompt_update $@
4 changes: 4 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ __am_prompt_install() {
local SHA_URI="https://api.github.com/repos/automotivemastermind/prompt/commits/master"
local PROMPT_SHA=$(curl $CURL_OPT $SHA_URI | grep sha | head -n 1 | sed 's#.*\:.*"\(.*\).*",#\1#')
local PROMPT_SHA_PATH=$HOME/.am/prompt/.sha
local PROMPT_CHANGELOG_URI="https://github.com/automotivemastermind/prompt/blob/$PROMPT_SHA/CHANGELOG.md"

echo $PROMPT_SHA > $PROMPT_SHA_PATH

Expand All @@ -143,6 +144,9 @@ __am_prompt_install() {

# use the correct shell
. $AM_PROMPT/sh/scripts/use-shell $PROMPT_SHELL

# open the changelog url
. $AM_PROMPT/sh/scripts/open-url $PROMPT_CHANGELOG_URI 1>/dev/null
}

__am_prompt_install $@
4 changes: 3 additions & 1 deletion src/sh/scripts/open-url
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ __am_prompt_open_url() {
fi
done

return 1
# no open or browser was available (headless)
echo "Open a browser: $url"
return 0
}

__am_prompt_open_url $@
2 changes: 0 additions & 2 deletions src/sh/scripts/update-prompt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ __am_prompt_update()
popd 1>/dev/null

rm -rf $PROMPT_INTALL_TEMP 1>/dev/null

open-url $CHANGELOG_URI 1>/dev/null
}

__am_prompt_update $@
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ color-name@1.1.3:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=

commander@~2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
commander@~2.20.3:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==

compare-func@^1.3.1:
version "1.3.2"
Expand Down Expand Up @@ -537,9 +537,9 @@ graceful-fs@^4.1.2:
integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==

handlebars@^4.1.0:
version "4.1.2"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67"
integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==
version "4.7.1"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.1.tgz#052bd2618964dcb8aebad0940bfeb2d8d1cfbfde"
integrity sha512-2dd6soo60cwKNJ90VewNLIzdZPR/E2YhszOTgHpN9V0YuwZk7x33/iZoIBnASwDFVHMY7iJ6NPL8d9f/DWYCTA==
dependencies:
neo-async "^2.6.0"
optimist "^0.6.1"
Expand Down Expand Up @@ -1407,11 +1407,11 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

uglify-js@^3.1.4:
version "3.6.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
version "3.7.5"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.5.tgz#278c7c24927ac5a32d3336fc68fd4ae1177a486a"
integrity sha512-GFZ3EXRptKGvb/C1Sq6nO1iI7AGcjyqmIyOw0DrD0675e+NNbGO72xmMM2iEBdFbxaTLo70NbjM/Wy54uZIlsg==
dependencies:
commander "~2.20.0"
commander "~2.20.3"
source-map "~0.6.1"

util-deprecate@^1.0.1, util-deprecate@~1.0.1:
Expand Down

0 comments on commit f83efc4

Please sign in to comment.