Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
e1fab646
提交
e1fab646
authored
4月 24, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Automated build
上级
39e71307
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
108 行增加
和
29 行删除
+108
-29
Build.java
h2/src/tools/org/h2/build/Build.java
+16
-14
UploadBuild.java
h2/src/tools/org/h2/build/doc/UploadBuild.java
+60
-14
buildNewsfeed.sql
h2/src/tools/org/h2/build/doc/buildNewsfeed.sql
+31
-0
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+1
-1
没有找到文件。
h2/src/tools/org/h2/build/Build.java
浏览文件 @
e1fab646
...
...
@@ -111,20 +111,6 @@ public class Build extends BuildBase {
"org.h2.test.TestAll"
});
}
/**
* Upload the Emma code coverage results to the web site.
*/
public
void
coverageUpload
()
{
String
password
=
System
.
getProperty
(
"h2.ftpPassword"
);
if
(
password
==
null
)
{
throw
new
Error
(
"h2.ftpPassword not set"
);
}
String
cp
=
"temp"
+
File
.
pathSeparator
+
"bin"
;
exec
(
"java"
,
new
String
[]
{
"-Xmx128m"
,
"-cp"
,
cp
,
"-Dh2.ftpPassword="
+
password
,
"org.h2.build.doc.UploadCoverage"
});
}
/**
* Switch the source code to the current JDK.
*/
...
...
@@ -557,6 +543,22 @@ public class Build extends BuildBase {
}
}
/**
* This build target is used for the automated build. It copies the result
* of the automated build (including test results, newsfeed, code coverage)
* to the public web site.
*/
public
void
uploadBuild
()
{
String
password
=
System
.
getProperty
(
"h2.ftpPassword"
);
if
(
password
==
null
)
{
throw
new
Error
(
"h2.ftpPassword not set"
);
}
String
cp
=
"bin"
+
File
.
pathSeparator
+
"temp"
;
exec
(
"java"
,
new
String
[]
{
"-Xmx128m"
,
"-cp"
,
cp
,
"-Dh2.ftpPassword="
+
password
,
"org.h2.build.doc.UploadBuild"
});
}
/**
* Build the h2console.war file.
*/
...
...
h2/src/tools/org/h2/build/doc/Upload
Coverage
.java
→
h2/src/tools/org/h2/build/doc/Upload
Build
.java
浏览文件 @
e1fab646
package
org
.
h2
.
build
.
doc
;
/*
* Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package
org
.
h2
.
build
.
doc
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileOutputStream
;
import
java.io.FileReader
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStreamReader
;
import
java.io.OutputStream
;
import
java.io.StringReader
;
import
java.sql.Connection
;
import
java.sql.DriverManager
;
import
java.sql.ResultSet
;
import
java.util.zip.CRC32
;
import
java.util.zip.Deflater
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
org.h2.dev.ftp.FtpClient
;
import
org.h2.test.utils.OutputCatcher
;
import
org.h2.tools.RunScript
;
import
org.h2.util.FileUtils
;
import
org.h2.util.IOUtils
;
import
org.h2.util.StringUtils
;
...
...
@@ -22,7 +33,7 @@ import org.h2.util.StringUtils;
/**
* Upload the code coverage result to the H2 web site.
*/
public
class
Upload
Coverage
{
public
class
Upload
Build
{
/**
* This method is called when executing this application from the command
...
...
@@ -55,7 +66,10 @@ public class UploadCoverage {
FileUtils
.
delete
(
"details/coverage_files.zip"
);
FileUtils
.
delete
(
"details"
);
String
password
=
System
.
getProperty
(
"h2.ftpPassword"
);
if
(
password
!=
null
)
{
if
(
password
==
null
)
{
return
;
}
FtpClient
ftp
=
FtpClient
.
open
(
"h2database.com"
);
ftp
.
login
(
"h2database"
,
password
);
ftp
.
changeWorkingDirectory
(
"/httpdocs"
);
...
...
@@ -63,12 +77,44 @@ public class UploadCoverage {
ftp
.
removeDirectoryRecursive
(
"/httpdocs/coverage"
);
}
ftp
.
makeDirectory
(
"/httpdocs/coverage"
);
String
testOutput
=
IOUtils
.
readStringAndClose
(
new
FileReader
(
"docs/html/testOutput.html"
),
-
1
);
boolean
error
=
testOutput
.
indexOf
(
OutputCatcher
.
START_ERROR
)
>=
0
;
if
(!
ftp
.
exists
(
"/httpdocs"
,
"automated"
))
{
ftp
.
makeDirectory
(
"/httpdocs/automated"
);
}
String
buildSql
;
if
(
ftp
.
exists
(
"/httpdocs/automated"
,
"history.sql"
))
{
buildSql
=
new
String
(
ftp
.
retrieve
(
"/httpdocs/automated/history.sql"
));
}
else
{
buildSql
=
"create table item(id identity, title varchar, issued timestamp, desc varchar);\n"
;
}
String
ts
=
new
java
.
sql
.
Timestamp
(
System
.
currentTimeMillis
()).
toString
();
String
now
=
ts
.
substring
(
0
,
16
);
String
sql
=
"insert into item(title, issued, desc) values('Build "
+
now
+
(
error
?
" FAILED"
:
""
)
+
"', '"
+
ts
+
"', '<a href=\"http://www.h2database.com/html/testOutput.html\">Output</a>"
+
" - <a href=\"http://www.h2database.com/coverage/overview.html\">Coverage</a>');\n"
;
buildSql
+=
sql
;
Class
.
forName
(
"org.h2.Driver"
);
Connection
conn
=
DriverManager
.
getConnection
(
"jdbc:h2:mem:"
);
RunScript
.
execute
(
conn
,
new
StringReader
(
buildSql
));
InputStream
in
=
UploadBuild
.
class
.
getResourceAsStream
(
"buildNewsfeed.sql"
);
ResultSet
rs
=
RunScript
.
execute
(
conn
,
new
InputStreamReader
(
in
,
"ISO-8859-1"
));
in
.
close
();
rs
.
next
();
String
content
=
rs
.
getString
(
"content"
);
conn
.
close
();
ftp
.
store
(
"/httpdocs/automated/history.sql"
,
new
ByteArrayInputStream
(
buildSql
.
getBytes
()));
ftp
.
store
(
"/httpdocs/automated/newsfeed.xml"
,
new
ByteArrayInputStream
(
content
.
getBytes
()));
ftp
.
store
(
"/httpdocs/html/testOutput.html"
,
new
ByteArrayInputStream
(
testOutput
.
getBytes
()));
ftp
.
store
(
"/httpdocs/coverage/overview.html"
,
new
FileInputStream
(
"coverage/overview.html"
));
ftp
.
store
(
"/httpdocs/coverage/coverage.zip"
,
new
FileInputStream
(
"coverage.zip"
));
ftp
.
close
();
FileUtils
.
delete
(
"coverage.zip"
);
}
}
private
static
void
zip
(
String
destFile
,
String
directory
,
boolean
storeOnly
)
throws
IOException
{
OutputStream
out
=
new
FileOutputStream
(
destFile
);
...
...
h2/src/tools/org/h2/build/doc/buildNewsfeed.sql
0 → 100644
浏览文件 @
e1fab646
/*
* Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
CREATE
TABLE
CHANNEL
(
TITLE
VARCHAR
,
LINK
VARCHAR
,
DESC
VARCHAR
,
LANGUAGE
VARCHAR
,
PUB
TIMESTAMP
,
LAST
TIMESTAMP
,
AUTHOR
VARCHAR
);
INSERT
INTO
CHANNEL
VALUES
(
'H2 Database Automated Build'
,
'http://www.h2database.com/html/build.html#automated'
,
'H2 Database Automated Build'
,
'en-us'
,
NOW
(),
NOW
(),
'Thomas Mueller'
);
SELECT
XMLSTARTDOC
()
||
XMLNODE
(
'feed'
,
XMLATTR
(
'version'
,
'0.3'
)
||
XMLATTR
(
'xmlns'
,
'http://purl.org/atom/ns#'
)
||
XMLATTR
(
'xml:lang'
,
C
.
LANGUAGE
),
XMLNODE
(
'title'
,
XMLATTR
(
'type'
,
'text/plain'
)
||
XMLATTR
(
'mode'
,
'escaped'
),
C
.
TITLE
)
||
XMLNODE
(
'author'
,
NULL
,
XMLNODE
(
'name'
,
NULL
,
C
.
AUTHOR
))
||
XMLNODE
(
'link'
,
XMLATTR
(
'rel'
,
'alternate'
)
||
XMLATTR
(
'type'
,
'text/html'
)
||
XMLATTR
(
'href'
,
C
.
LINK
),
NULL
)
||
XMLNODE
(
'modified'
,
NULL
,
FORMATDATETIME
(
C
.
LAST
,
'yyyy-MM-dd
''
T
''
HH:mm:ss.SSS'
,
'en'
,
'GMT'
))
||
GROUP_CONCAT
(
XMLNODE
(
'entry'
,
NULL
,
XMLNODE
(
'title'
,
XMLATTR
(
'type'
,
'text/plain'
)
||
XMLATTR
(
'mode'
,
'escaped'
),
I
.
TITLE
)
||
XMLNODE
(
'link'
,
XMLATTR
(
'rel'
,
'alternate'
)
||
XMLATTR
(
'type'
,
'text/html'
)
||
XMLATTR
(
'href'
,
C
.
LINK
),
NULL
)
||
XMLNODE
(
'id'
,
NULL
,
XMLTEXT
(
C
.
LINK
||
'/'
||
I
.
ID
))
||
XMLNODE
(
'issued'
,
NULL
,
FORMATDATETIME
(
I
.
ISSUED
,
'yyyy-MM-dd
''
T
''
HH:mm:ss.SSS'
,
'en'
,
'GMT'
))
||
XMLNODE
(
'modified'
,
NULL
,
FORMATDATETIME
(
I
.
ISSUED
,
'yyyy-MM-dd
''
T
''
HH:mm:ss.SSS'
,
'en'
,
'GMT'
))
||
XMLNODE
(
'content'
,
XMLATTR
(
'type'
,
'text/html'
)
||
XMLATTR
(
'mode'
,
'escaped'
),
XMLCDATA
(
I
.
DESC
))
)
ORDER
BY
I
.
ID
DESC
SEPARATOR
''
)
)
CONTENT
FROM
CHANNEL
C
,
ITEM
I
;
\ No newline at end of file
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
e1fab646
...
...
@@ -587,4 +587,4 @@ consistently springfuse grep signatures wrote symbolic parents caches readers
animate scaladoc models disadvantages vladykin sergi trims requesting
handing bonita placed euros embeds reliability singular unregister quotas
overall httpdocs tigris eclemma separates underscore yajsw she her truncating
relocating smtps smtp osde joist
\ No newline at end of file
relocating smtps smtp osde joist catching
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论