Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Commit

Permalink
Merge branch 'feature/renameProperty'
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantinos Niktas committed Jun 24, 2015
2 parents f36063e + 16ecc99 commit d36cb29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ CHANGELOG

Future Version
=======
-Breaking: FlexVersion object property 'tag' renamed to 'isTag'
-Breaking: Since symlink support was added (jgit is fun), this will no longer work with Java 6

0.5.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class FlexVersion {
String gitHash // The git hash truncated to 12 characters
int commitCount // The number of commits in HEAD's history
boolean dirty // Is the dirty bit set?
boolean tag // Is the domain from a tag?
boolean isTag // Is the domain from a tag?
String toString() // The fully filled in version that Gradle would use
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class FlexVersion {
final int commitCount;

final boolean dirty;
final boolean tag;
final boolean isTag;


public FlexVersion (String domain, int commitCount, String gitHash, boolean tag, boolean dirty) {
public FlexVersion (String domain, int commitCount, String gitHash, boolean isTag, boolean dirty) {
this.domain = domain;
this.commitCount = commitCount;
this.gitHash = gitHash;
this.tag = tag;
this.isTag = isTag;
this.dirty = dirty;

if (this.gitHash.length() > 12) {
Expand All @@ -44,7 +44,7 @@ class FlexVersion {

public String toString() {
String version = null;
if (this.tag) {
if (this.isTag) {
version = "${this.domain}";
} else {
version = "${this.domain}-${this.commitCount}-g${this.gitHash}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class FlexVersionTests {
assert version.domain == "objecttest"
assert version.commitCount == commits
assert version.gitHash == headShaShort
assert version.tag == false
assert version.isTag == false
assert version.toString() == "objecttest-${commits}-g${headShaShort}"
}

Expand All @@ -142,7 +142,7 @@ class FlexVersionTests {
assert version.domain == HEAD_TAG_NAME
assert version.commitCount == commits
assert version.gitHash == headShaShort
assert version.tag == true
assert version.isTag == true
assert version.toString() == HEAD_TAG_NAME
}
}

0 comments on commit d36cb29

Please sign in to comment.