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

Fix __VERSION__ undefined in dev mode #1897

Merged
merged 4 commits into from
Aug 22, 2018
Merged

Conversation

tchakabam
Copy link
Collaborator

@tchakabam tchakabam commented Aug 22, 2018

Moving to Travis deploy probably broke this? Seems to be a valid fix @tjenkinson ? :)

Is it intended we don't have a version number anymore in the package.json?

Copy link
Member

@tjenkinson tjenkinson left a comment

Choose a reason for hiding this comment

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

Yes version is only set in the published packages. Maybe it makes more sense to set it to something like DEVELOPMENT or the commit hash when running in dev mode?

@tchakabam
Copy link
Collaborator Author

tchakabam commented Aug 22, 2018

@tjenkinson I am just helping to re-establish the previous behavior here :) I suggest that if you want to get more fancy you take care of it!

Currently (with this PR) when there is a diff between the last tag and the current commit, it will say v0.11.1-SNAPSHOT (for current v0.11.0).

I find that sufficient to indicate what's going on.

There are other possibilities supported by the script here, like including the timestamp: https://www.npmjs.com/package/git-tag-version

I don't really see the need for seeing the commitish in the demo page, anyone can check that on the CLI.

But I think it was cool to have the version number in there in dev mode, and this was broken by the recent move to Travis deploy, and I just want a fix for that which renders to what we had before :)

@tchakabam
Copy link
Collaborator Author

tchakabam commented Aug 22, 2018

You may be right, a commitish might come in handy for people testing sometimes, and was very quick to add 👍

Btw it also contains the branch name now, followed by the short commit hash.

Copy link
Member

@tjenkinson tjenkinson left a comment

Choose a reason for hiding this comment

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

Neat

@tchakabam tchakabam merged commit d252901 into master Aug 22, 2018
@tchakabam tchakabam deleted the fix/dev-mode-version-no branch November 20, 2018 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants