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

Custom build grabs version tag from the parent project #871

Closed
forbesjo opened this issue Jun 12, 2017 · 2 comments
Closed

Custom build grabs version tag from the parent project #871

forbesjo opened this issue Jun 12, 2017 · 2 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@forbesjo
Copy link

forbesjo commented Jun 12, 2017

I've installed shaka-player as a dependency to my app and am creating a custom build which removes modules I don't need:

...
    "prebuild": "node_modules/shaka-player/build/build.py --name bc +@complete -@offline -@cast -@hls --force",
...

This grabs my project's git version and messes up shaka.Player.version. The build process should probably fall back to using npm_version() somehow.

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Jun 12, 2017
@joeyparrish
Copy link
Member

joeyparrish commented Jun 12, 2017

Your proposal to use npm version here sounds reasonable to me. The version comes from calculate_version() in build/shakaBuildHelpers.py. Perhaps git_version() could fail when there is no .git in the source base.

@joeyparrish joeyparrish added this to the v2.2.0 milestone Jun 12, 2017
joeyparrish pushed a commit that referenced this issue Jul 17, 2017
If the shaka-player directory doesn't have a '.git' file, we'll use the
npm version instead of finding the '.git' file in the whole repository.
This is to prevent grabbing version tag from a parent project, which
uses shaka-player as a dependency.

Test command:
python -c 'from build import shakaBuildHelpers; print
shakaBuildHelpers.calculate_version()'
If there's is a .git file, it shows the git version.
If not, it shows the npm version.

Closes #871

Change-Id: Iee3cd6868c46f327966fd6ce5071ca7b750174b6
@joeyparrish
Copy link
Member

The fix for this has been cherry-picked and will be released in v2.1.5.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants