Comments (2)
Fixed in 0.4.0
: use tagPattern
to specify which tags are interesting and which are not. So in this case if your release
branch is targeting 2.0
while your master
branch targets 3.0
, you could just add tagPattern /^3.*/
to the build config in master
.
from gradle-android-git-version.
@gladed I'm not sure if I'm matching your original diagram, but for the sake of mine, assume that new development is being done on master, and therefore the version of the release branch is always lower than newer commits on master.
1.0.0 1.1.0 [a] [b]
master: *-----*-----*-----*-----*
\
release: *-------------*
1.0.1 1.0.2
In this state, the output of git describe
on the commits tagged as 1.1.0 and 1.0.2 are straightforward (simply the tags themselves), and the output for commit [a] is 1.1.0-1-ga and commit [b] is 1.1.0-2-gb. Now, let's merge the changes made in 1.0.1 and 1.0.2 into master (so that those hot fixes make it into 1.1.+)
1.0.0 1.1.0 [a] [b] [c]
master: *-----*-----*-----*-----*-----*
\ /
release: *-------------*------
1.0.1 1.0.2
In my experience, the output of git describe
on commit [c] is 1.1.0-5-gc (and not 1.0.2-5-gc) even though the 1.0.2 tag is "closer". Again, I'm not an expert on what's going on under the hood, but I can imagine a couple of ways git describe
may have been designed so that it takes some number of factors into account in order to make sure it produces an accurate/helpful version description.
If what I've described is accurate, would the use of git describe
help solve this issue? Or have I misunderstood the issue and/or diagram altogether?
from gradle-android-git-version.
Related Issues (20)
- Remove deprecated items
- Replace commitHashLength with format extension
- Replace untrackedIsDirty with format extension
- Use --first-parent strategy
- Match git-describe commit hash
- Document git-describe format HOT 1
- Changelog HOT 1
- Describe output is empty? HOT 5
- Clean up testNearestTag test
- Recent update of jgit breaks compatibility with older Gradle versions HOT 1
- .. HOT 1
- [question] Support for incremental versionCode separately from versionName? HOT 6
- Different format per buildType? HOT 2
- Bare Repository has neither a working tree, nor an index via execution of git hooks HOT 12
- Include proper task descriptions
- Add direct access to components
- Nearest tag with optional tagPattern
- Unable to download jgit from jcenter
- It's keep saying untagged even though I already did
- Allow different format for non-tagged version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-android-git-version.