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

Embed BuildInfo in plugin. #395

Merged
merged 1 commit into from
Aug 24, 2015
Merged

Conversation

advayDev1
Copy link
Contributor

  • Display version, etc. info on startup
  • Warn if using an unofficial release
  • Determine whether build was clean (git-wise)

Fixes #394

Based on:
https://gist.github.com/advayDev1/56ac2d57d072364adc79

@advayDev1
Copy link
Contributor Author

Actually - please ignore this for a bit. Let me use the actual git build info plugin instead of dupe-ing the code.

@advayDev1 advayDev1 assigned advayDev1 and unassigned brunobowden Aug 23, 2015
@brunobowden
Copy link
Contributor

Sure thing

On Sun, Aug 23, 2015 at 2:57 PM Advay Mengle [email protected]
wrote:

Actually - please ignore this for a bit. Let me use the actual git build
info plugin instead of dupe-ing the code.


Reply to this email directly or view it on GitHub
#395 (comment)
.

@advayDev1
Copy link
Contributor Author

ptal, now using a real plugin.

@@ -9,3 +9,4 @@ j2objc-gradle.iml
gradlew.bat

local.properties
src-gen/
Copy link
Contributor

Choose a reason for hiding this comment

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

Why doesn't git-build-info output to the build directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it does. this is old. reverting.

// Based on https://plugins.gradle.org/docs/publish-plugin

plugins {
id "com.gradle.plugin-publish" version "0.9.0"
// Outputs a BuildInfo.java file with information about the git repo;
// also fails plugin publishing if your git working directory is unclean.
Copy link
Contributor

Choose a reason for hiding this comment

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

If accurate, this would be more helpful as an explanation:

...if your git doesn't match a public commit merged in to master

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. A git working directory being clean is pretty standard wording.

Also it isn't enforcing whether your commits are public or on master.
People often use release branches not called master, and the code is currently not tied to github either (or you might have a private repo, etc.).

The goal is to enforce that you know that state of your repo; if GIT_IS_CLEAN is true and you have a commit SHA, chances are pretty good you do know the state. It isn't guaranteeing that others know the state of the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i did clarify the above in the comment though

@brunobowden
Copy link
Contributor

LGTM with one suggestion on plugin comment

@advayDev1
Copy link
Contributor Author

thanks. the plugin doesn't enforce the additional comment you made, but you're more than welcome to add that functionality as optional :)

- Display version, etc. info on startup
- Warn if using an unofficial release
- Determine whether build was clean (git-wise)
- Prevents publishing from unclean working dir

Fixes j2objc-contrib#394

Uses https://github.com/madvay/git-build-info plugin
advayDev1 added a commit that referenced this pull request Aug 24, 2015
@advayDev1 advayDev1 merged commit 7a27501 into j2objc-contrib:master Aug 24, 2015
@advayDev1 advayDev1 deleted the embedVersion branch August 24, 2015 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants