Skip to content

Commit 5ea3949

Browse files
author
Ben Podgursky
committed
resolve
2 parents d37e32f + cfea948 commit 5ea3949

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

pom.xml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<groupId>com.code54.mojo</groupId>
1313
<artifactId>buildversion-plugin</artifactId>
14-
<version>1.0.4-SNAPSHOT</version>
14+
<version>1.0.5-SNAPSHOT</version>
1515
<packaging>maven-plugin</packaging>
1616

1717
<name>buildversion-plugin</name>
@@ -44,6 +44,23 @@
4444
</properties>
4545

4646

47+
<pluginRepositories>
48+
<pluginRepository>
49+
<id>sonatype-releases</id>
50+
<url>http://oss.sonatype.org/content/repositories/releases</url>
51+
</pluginRepository>
52+
<pluginRepository>
53+
<id>clojars.org</id>
54+
<url>http://clojars.org/repo</url>
55+
</pluginRepository>
56+
57+
<!-- If you want to try SNAPSHOT versions, you need Sonatype's snapshots repo: -->
58+
<pluginRepository>
59+
<id>sonatype-snapshots</id>
60+
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
61+
</pluginRepository>
62+
</pluginRepositories>
63+
4764
<profiles>
4865
<profile>
4966
<id>release-sign-artifacts</id>

src/main/clojure/buildversion_plugin/git.clj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@
6868
commit-tstamp-str (.format (SimpleDateFormat. format-str)
6969
commit-tstamp)
7070

71+
remote-scm-server
72+
(try
73+
(join "/"
74+
(butlast
75+
(split
76+
(run-git-wait dir ["ls-remote" "--get-url"])
77+
#"/")))
78+
(catch java.lang.RuntimeException e ""))
79+
80+
7181
[short-hash long-hash] (split
7282
(run-git-wait dir
7383
["log" "-n" "1" "--format=%h %H"])
@@ -76,6 +86,7 @@
7686
versioning-properties {:build-tag "N/A"
7787
:build-version "N/A"
7888
:build-tag-delta "0"
89+
:remote remote-scm-server
7990
:build-tstamp commit-tstamp-str
8091
:build-commit long-hash
8192
:build-commit-abbrev short-hash }

src/test/bash/create-sample-git-project.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
echo "Running $0 ..."
44
TARGET_DIR="$1"
55

6+
git config alias.co checkout
7+
git config alias.br branch
8+
git config alias.ci commit
9+
git config alias.st status
10+
611
#rm -rf $TARGET_DIR
712
mkdir -p $TARGET_DIR
813
cd $TARGET_DIR
@@ -16,6 +21,8 @@ git config alias.st status
1621
git init
1722
> README.txt
1823

24+
git remote add origin [email protected]:MasterRepo/oov.git
25+
1926
git add README.txt
2027
git ci -m "Initial commit. Before any tag"
2128

src/test/clojure/buildversion_plugin/test/git.clj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@
8989
{:build-version #"^1.0.0-SNAPSHOT$"
9090
:build-tag #"^1.0.0-SNAPSHOT$"
9191
:build-tag-delta #"0"
92+
:remote #"[email protected]:MasterRepo"
9293
:build-tstamp #"\d+"
9394
:build-commit #"[a-f\d]+"
9495
})
9596

9697
(assert-for-commit "dev commit 5"
9798
{:build-version #"1.1.0-SNAPSHOT-3.*"
9899
:build-tag #"^1.1.0-SNAPSHOT$"
100+
:remote #"[email protected]:MasterRepo"
99101
:build-tag-delta #"3"
100102
:build-tstamp #"\d+"
101103
:build-commit #"[a-f\d]+"
@@ -104,6 +106,7 @@
104106
(assert-for-commit "dev commit 1"
105107
{:build-version #"^1.0.0-SNAPSHOT-1.*"
106108
:build-tag #"^1.0.0-SNAPSHOT"
109+
:remote #"[email protected]:MasterRepo"
107110
:build-tag-delta #"1"
108111
:build-tstamp #"\d+"
109112
:build-commit #"[a-f\d]+"
@@ -113,6 +116,7 @@
113116
(assert-for-commit "Initial commit. Before any tag"
114117
{:build-version #"N/A"
115118
:build-tag #"N/A"
119+
:remote #"[email protected]:MasterRepo"
116120
:build-tag-delta #"0"
117121
:build-tstamp #"\d+"
118122
:build-commit #"[a-f\d]+"

0 commit comments

Comments
 (0)