summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2012-03-25 03:27:51 +0200
committerJosh Suereth <joshua.suereth@gmail.com>2012-03-24 22:17:16 -0400
commit313d1a60aedca8cc0197a93511f8c2edb97e7e6d (patch)
tree3260bd1b36f7c2e330696a8778b7dfd2b3a2f761 /build.xml
parent06765bf3660db2e11c6fe3a85db3b25373c2c9ed (diff)
downloadscala-313d1a60aedca8cc0197a93511f8c2edb97e7e6d.tar.gz
scala-313d1a60aedca8cc0197a93511f8c2edb97e7e6d.tar.bz2
scala-313d1a60aedca8cc0197a93511f8c2edb97e7e6d.zip
Scaladoc is now pointing to sources in github
For snapshots, it points to the exact commit, for releases it points to the tag ("v" + maven version). The link now opens in a different tab, as opening in the same frame is not compatible with github (the page doesn't load for some reason). Left the repo url in test/review untouched because it points to the root of all LAMP repos. But... is anyone still using that script?!? Conflicts: build.xml
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml21
1 files changed, 18 insertions, 3 deletions
diff --git a/build.xml b/build.xml
index be7ddea114..6029e6b240 100644
--- a/build.xml
+++ b/build.xml
@@ -1468,6 +1468,21 @@ DOCUMENTATION
</uptodate>
</sequential>
</macrodef>
+
+ <!-- Set the github commit scaladoc sources point to -->
+ <!-- For releases, look for the tag with the same name as the maven version -->
+ <condition property="scaladoc.git.commit" value="v${maven.version.number}">
+ <isset property="build.release"/>
+ </condition>
+ <!-- For snapshots, if we know the commit, point scaladoc to that particular commit instead of master -->
+ <condition property="scaladoc.git.commit" value="${git.commit.sha}">
+ <not><equals arg1="${git.commit.sha}" arg2="unknown"/></not>
+ </condition>
+ <!-- Fallback: point scaladoc to master -->
+ <property name="scaladoc.git.commit" value="master"/>
+ <!-- Compute the URL and show it -->
+ <property name="scaladoc.url" value="https://github.com/scala/scala/tree/${scaladoc.git.commit}/src"/>
+ <echo message="Scaladoc will point to ${scaladoc.url} for source files."/>
</target>
<target name="docs.pre-lib" depends="docs.start">
@@ -1489,7 +1504,7 @@ DOCUMENTATION
doctitle="Scala Standard Library"
docversion="${version.number}"
docfooter="epfl"
- docsourceurl="https://lampsvn.epfl.ch/trac/scala/browser/scala/branches/2.9.x/src/€{FILE_PATH}.scala#L1"
+ docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
docUncompilable="${src.dir}/library-aux"
sourcepath="${src.dir}"
classpathref="pack.classpath"
@@ -1570,7 +1585,7 @@ DOCUMENTATION
destdir="${build-docs.dir}/compiler"
doctitle="Scala Compiler"
docversion="${version.number}"
- docsourceurl="https://lampsvn.epfl.ch/trac/scala/browser/scala/branches/2.9.x/src/€{FILE_PATH}.scala#L1"
+ docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/compiler">
@@ -1612,7 +1627,7 @@ DOCUMENTATION
destdir="${build-docs.dir}/scalap"
doctitle="Scalap"
docversion="${version.number}"
- docsourceurl="https://lampsvn.epfl.ch/trac/scala/browser/scala/trunk/src/€{FILE_PATH}.scala#L1"
+ docsourceurl="${scaladoc.url}€{FILE_PATH}.scala#L1"
sourcepath="${src.dir}"
classpathref="pack.classpath"
srcdir="${src.dir}/scalap">