8000 Logging by Zordrak · Pull Request #154 · tfutils/tfenv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Logging #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ matrix:
include:
- os: linux
dist: bionic
- os: linux
dist: xenial
- os: linux
dist: trusty
- os: osx
osx_image: xcode11.2
- os: osx
Expand Down
9 changes: 5 additions & 4 deletions libexec/tfenv---version
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ fi;

log 'debug' 'Scraping tfenv version from CHANGELOG.md';
version="$(awk '/^##/{ print $2; exit}' "${TFENV_ROOT}/CHANGELOG.md")" \
&& log 'debug' "Found version '${version}' in CHANGELOG.md" \
|| log 'error' 'Failed to scrape version from CHANGELOG.md';
git_revision="";

if cd "${BASH_SOURCE%/*}" 2>/dev/null && git remote -v 2>/dev/null | grep -q tfenv; then
log 'debug' 'Getting git revision...';
git_revision="";
if cd "$(dirname ${0})" 2>/dev/null && git remote -v 2>/dev/null | grep -q tfenv; then
log 'debug' 'Git configuration found. Overriding CHANGELOG version from git revision...';
git_revision="$(git describe --tags HEAD 2>/dev/null || true)";
log 'debug' "Stripping git revision string ${git_revision}";
log 'debug' "Stripping git revision string from ${git_revision}";
git_revision="${git_revision#v}";
fi;

Expand Down
0