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

Environment variable DUB_PACKAGE_VERSION added #1562

Merged
merged 1 commit into from
Oct 8, 2018
Merged

Environment variable DUB_PACKAGE_VERSION added #1562

merged 1 commit into from
Oct 8, 2018

Conversation

andre2007
Copy link
Contributor

@andre2007 andre2007 commented Sep 14, 2018

The new environment variable DUB_PACKAGE_VERSION can be used in shell / batch scripts called from "preGenerateCommands". The version of the package can be written to module file.
This would simplify e.g. this logic https://github.com/dlang/dub/blob/master/build.cmd

Is a unit test needed for the new environment variable?

@dlang-bot
Copy link
Collaborator

Thanks for your pull request and interest in making D better, @andre2007! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

@PetarKirov
Copy link
Member

When I read the the title I thought that this was exposing the version of dub itself and not of the currently compiled package. I think a more descriptive name would be DUB_PACKAGE_VERSION - would you mind renaming it to that?

@andre2007 andre2007 changed the title Environment variable DUB_VERSION added Environment variable DUB_PACKAGE_VERSION added Sep 15, 2018
@andre2007
Copy link
Contributor Author

@ZombineDev done:)

Copy link
Member

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

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

Nice, but needs a PR to dub-docs before it can be merged.

@wilzbach
Copy link
Member

This will be a lot nice than e.g. this hack here: https://github.com/dlang-community/D-Scanner/blob/master/dub.json#L27

@WebFreak001
Copy link
Member

well it will sadly not be enough to fix it recompiling every time just yet, but useful nevertheless.

@andre2007
Copy link
Contributor Author

Documents update dlang/dub-docs#7

PING :)

@wilzbach wilzbach merged commit 67d420a into dlang:master Oct 8, 2018
@andre2007 andre2007 deleted the feature_env_var_version branch November 13, 2018 20:13
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.

5 participants