* [JGIT PATCH 1/1] Generate javadoc when making jgit. Also, package docs into a zip for distribution.
@ 2009-08-10 4:32 Nicholas Campbell
2009-08-10 14:56 ` Shawn O. Pearce
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Campbell @ 2009-08-10 4:32 UTC (permalink / raw)
To: git; +Cc: Shawn O. Pearce, Robin Rosenberg
Runs through defined "PLUGINS" and creates Javadoc. Assumes src is a subdir.
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
---
make_jgit.sh | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/make_jgit.sh b/make_jgit.sh
index baaa3af..25ac15c 100755
--- a/make_jgit.sh
+++ b/make_jgit.sh
@@ -3,6 +3,7 @@
O_CLI=jgit
O_JAR=jgit.jar
O_SRC=jgit_src.zip
+O_DOC=jgit_docs.zip
PLUGINS="
org.spearce.jgit
@@ -119,3 +120,12 @@ mv $O_CLI+ $O_CLI &&
echo "Created $O_CLI." || die "Build failed."
cleanup_bin
+
+echo "Build Docs"
+for p in $PLUGINS; do
+ javadoc -sourcepath "$p/src/" -d "docs/$p/" `find "$p/src" -name "*.java"`
+done
+
+jar cf "$O_DOC" docs/
+echo "Created $O_DOC."
+
--
1.6.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [JGIT PATCH 1/1] Generate javadoc when making jgit. Also, package docs into a zip for distribution.
2009-08-10 4:32 [JGIT PATCH 1/1] Generate javadoc when making jgit. Also, package docs into a zip for distribution Nicholas Campbell
@ 2009-08-10 14:56 ` Shawn O. Pearce
0 siblings, 0 replies; 2+ messages in thread
From: Shawn O. Pearce @ 2009-08-10 14:56 UTC (permalink / raw)
To: Nicholas Campbell; +Cc: git, Robin Rosenberg
Nicholas Campbell <nicholas.j.campbell@gmail.com> wrote:
> Runs through defined "PLUGINS" and creates Javadoc. Assumes src is a subdir.
>
> Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
> ---
> make_jgit.sh | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
Thanks. This didn't apply cleanly to tip of tree, so I hand merged
it in, but then modified it a bit. This is what I actually applied:
--8<--
From: Nicholas Campbell <nicholas.j.campbell@gmail.com>
Subject: [PATCH] Generate javadoc during ./make_jgit.sh
Package docs into a zip for distribution. Runs through defined
"PLUGINS" and creates Javadoc. Assumes src is a subdir.
Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
[sp: cleaned up docs/ directory after build; removed docs/ from zip]
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
.gitignore | 1 +
make_jgit.sh | 13 ++++++++++++-
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/.gitignore b/.gitignore
index baf2766..5219cbc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/jgit
/jgit.jar
/jgit_src.zip
+/jgit_docs.zip
diff --git a/make_jgit.sh b/make_jgit.sh
index baaa3af..9608b70 100755
--- a/make_jgit.sh
+++ b/make_jgit.sh
@@ -3,6 +3,7 @@
O_CLI=jgit
O_JAR=jgit.jar
O_SRC=jgit_src.zip
+O_DOC=jgit_docs.zip
PLUGINS="
org.spearce.jgit
@@ -39,6 +40,7 @@ cleanup_bin() {
do
rm -rf $p/bin2
done
+ rm -rf docs
}
die() {
@@ -49,7 +51,7 @@ die() {
}
cleanup_bin
-rm -f $O_CLI $O_JAR $O_SRC
+rm -f $O_CLI $O_JAR $O_SRC $O_DOC
VN=`git describe --abbrev=4 HEAD 2>/dev/null`
git update-index -q --refresh
@@ -118,4 +120,13 @@ chmod 555 $O_CLI+ &&
mv $O_CLI+ $O_CLI &&
echo "Created $O_CLI." || die "Build failed."
+echo "Building Javadocs ..."
+for p in $PLUGINS; do
+ javadoc -sourcepath "$p/src/" -d "docs/$p/" \
+ `find "$p/src" -name "*.java"`
+done
+
+(cd docs && jar cf "../$O_DOC" .)
+echo "Created $O_DOC."
+
cleanup_bin
--
1.6.4.70.g9c084
--
Shawn.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-10 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-10 4:32 [JGIT PATCH 1/1] Generate javadoc when making jgit. Also, package docs into a zip for distribution Nicholas Campbell
2009-08-10 14:56 ` Shawn O. Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).