Skip to content
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

Use NOTION_RELEASE environment value if defined as version and sh compat #86

Merged
merged 1 commit into from
May 3, 2019

Conversation

knixeur
Copy link
Collaborator

@knixeur knixeur commented May 3, 2019

Use technique suggested in https://stackoverflow.com/q/7292584
to check git can be executed

Edit: I've updated the PR, we talked in IRC and an environment value is a better fit

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I think the new behavior is better than the old: If a .git is present, I'd say I'd prefer the 'git not found' error over continuing with an empty version.

@knixeur
Copy link
Collaborator Author

knixeur commented May 3, 2019

You're right, I'm swallowing the version it should go to the else condition too.

@raboof
Copy link
Owner

raboof commented May 3, 2019

The 'else' expects you to be in a directory that follows the github tag zip download naming conventions - if there is a .git directory present then it's unlikely the directory name follows that convention...

@knixeur knixeur changed the title Avoid git not found when calling make if git is not present Use NOTION_RELEASE environment value if defined as version and sh compat May 3, 2019
version.sh Outdated Show resolved Hide resolved
if [ -e ".git" ]; then
# Git:
echo -n `git describe`
if [[ -n $(git status -s) ]]; then
if [ ! -z "$(echo -n `git status -s`)" ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Copy link
Owner

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@raboof raboof merged commit 582a687 into raboof:master May 3, 2019
@raboof raboof added the development issues that don't impact end users directly label Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development issues that don't impact end users directly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants