提交 22f467ed authored 作者: Thomas Mueller's avatar Thomas Mueller

automate release process

上级 207f063c
@echo off
echo %time:~0,8%
setlocal
cd ../..
rem call java16
rem call build all
rem makensis /v2 src/installer/h2.nsi
rem soffice.exe -invisible macro:///Standard.Module1.H2Pdf
set today=%date:~6%%date:~3,2%%date:~0,2%
rmdir /s /q ..\h2web-%today% 2>nul
rmdir /s /q ..\h2web 2>nul
mkdir ..\h2web
rem echo Test with Hibernate
rem echo Run FindBugs
rem pause
rmdir /s /q bin 2>nul
rmdir /s /q temp 2>nul
call java14 >nul 2>nul
call build -quiet compile
call build -quiet spellcheck
call build -quiet jarClient
rem echo Check jar file size
rem pause
call build -quiet jar
call build -quiet javadocImpl
call java16 >nul 2>nul
call build -quiet compile
set classpath=
call build -quiet javadoc
call build -quiet javadocImpl
rem echo Check if missing javadocs
rem pause
call java14 >nul 2>nul
call build -quiet compile
call java16 >nul 2>nul
call build -quiet compile
rem echo Change version and build number in Constants.java
rem echo Maybe increase TCP_DRIVER_VERSION (old clients must be compatible!)
rem echo Check code coverage
rem echo No " Message.get" (must be "throw Message.get")
rem echo Check that is no TODO in the docs
rem echo Run regression test with JDK 1.4 and 1.5
rem echo Use latest versions of other dbs
rem echo Derby 10.4.1.3
rem echo PostgreSQL 8.3.1
rem echo MySQL 5.0.51
rem echo Change version(s) in performance.html
rem pause
rem call java14 >nul 2>nul
rem call build -quiet benchmark
rem Copy the benchmark results and update the performance page and diagram
rem echo Documentation: check if all Javadoc files are in the index
rem echo Update the changelog (add new version)
rem echo Update the newsfeed
rem pause
call build -quiet docs
rem echo Check dataWeb/index.html, versions and links in main, downloads, build
rem pause
soffice.exe -invisible macro:///Standard.Module1.H2Pdf
rem echo Check in the PDF file:
rem echo - footer
rem echo - front page
rem echo - orphan control
rem echo - check images
rem echo - table of contents
rem pause
call java14 >nul 2>nul
call build -quiet all
copy ..\h2web\h2.pdf docs >nul
rem echo Check the pdf file is in h2/docs
rem pause
call build -quiet zip
makensis /v2 src/installer/h2.nsi
rem echo Test Console
rem echo Test all languages
rem echo Scan for viruses
rem pause
call build -quiet mavenDeployCentral
rem echo Upload to SourceForge
rem pause
call java16 >nul 2>nul
call build -quiet compile
rem echo svn commit
rem echo svn copy: /svn/trunk /svn/tags/version-1.0.x; Version 1.0.x (yyyy-mm-dd)
rem echo Newsletter: prepare (always to BCC!!)
rem echo Upload to h2database.com, http://code.google.com/p/h2database/downloads/list
rem echo Newsletter: send (always to BCC!!)
rem echo Add to freshmeat
rem echo http://en.wikipedia.org/wiki/H2_%28DBMS%29 (change version)
rem echo http://www.heise.de/software/
ren ..\h2web h2web-%today%
echo %time:~0,8%
......@@ -3,7 +3,7 @@
SetCompressor /SOLID lzma
Name "H2"
Icon "favicon.ico"
OutFile "../../../h2-setup.exe"
OutFile "../../../h2web/h2-setup.exe"
CRCCheck on
InstallDir "$PROGRAMFILES\H2"
......
REM ***** BASIC *****
rem run macro: soffice.exe -invisible macro:///standard.module1.macro1
Sub Main
H2Pdf
End Sub
sub H2Pdf
BaseDir = "file:///C:/data/h2database/"
Url = "file:///C:/data/h2database/h2/docs/html/onePage.html"
Url = BaseDir & "h2/docs/html/onePage.html"
dim FileProperties(1) As New com.sun.star.beans.PropertyValue
FileProperties(0).Name = "FilterName"
FileProperties(0).Value = "HTML (StarWriter)"
FileProperties(1).Name = "UpdateDocMode"
FileProperties(1).Value = 3 'full update
document = StarDesktop.loadComponentFromURL(Url, "_blank", 0, FileProperties)
docs = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(docs, ".uno:UpdateAll", "", 0, Array())
StyleFamilies = document.StyleFamilies
ParagraphStyles = StyleFamilies.getByName("ParagraphStyles")
BodyStyle = ParagraphStyles.getByName("Text body")
BodyStyle.ParaOrphans = 2
BodyStyle.ParaWidows = 2
rem dim args1(2) as new com.sun.star.beans.PropertyValue
rem args1(0).Name = "Template"
rem args1(0).Value = "Text body"
rem args1(1).Name = "ParaOrphans"
rem args1(1).Value = 2
rem args1(2).Name = "ParaWidows"
rem args1(2).Value = 2
rem dispatcher.executeDispatch(docs, ".uno:StyleApply", "", 0, args1())
rem dim args1(0) as new com.sun.star.beans.PropertyValue
rem args1(0).Name = "Param"
rem args1(0).Value = "Text body"
rem dispatcher.executeDispatch(docs, ".uno:EditStyle", "", 0, args1())
rem MsgBox "OK"
rem wait 2000
HeadingStyle = ParagraphStyles.getByName("Heading 1")
HeadingStyle.BreakType = 3 ' Insert Page Break Before
HeadingStyle.ParaKeepTogether = false
rem dim args2(0) as new com.sun.star.beans.PropertyValue
rem args2(0).Name = "Param"
rem args2(0).Value = "Heading 1"
rem dispatcher.executeDispatch(docs, ".uno:EditStyle", "", 0, args2())
rem MsgBox "OK"
rem wait 2000
rem Dim args2(2) as new com.sun.star.beans.PropertyValue
rem args2(0).Name = "Template"
rem args2(0).Value = "Heading 1"
rem args2(1).Name = "BreakType"
rem args2(1).Value = 3
rem args2(2).Name = "ParaKeepTogether"
rem args2(2).Value = false
rem dispatcher.executeDispatch(docs, ".uno:StyleApply", "", 0, args2())
images = document.GraphicObjects
For i = 0 to images.getCount() - 1
image = images.getByIndex(i)
if image.Size.Width <> image.ActualSize.Width or image.Size.Height <> image.ActualSize.Height then
image.Size.Width = image.ActualSize.Width
image.Size.Height = image.ActualSize.Height
rem msgbox "update"
wait 100
wait 100
end if
Next
dispatcher.executeDispatch(docs, ".uno:UpdateAll", "", 0, Array())
rem ----------------------------------------------------------------------
PageStyles = StyleFamilies.getByName("PageStyles")
Standard = PageStyles.getByName("HTML")
......@@ -94,7 +56,7 @@ sub H2Pdf
PageCount.NumberingType = 4 ' magic constant: 4=Arabic numbers
FooterCursor = oText.Text.createTextCursor()
oText.insertString(FooterCursor, Chr(09)& Chr(09), False)
oText.insertString(FooterCursor, Chr(09)& Chr(09), False)
oText.insertTextContent(FooterCursor, PageNumber, False)
oText.insertString(FooterCursor, " of ", False)
oText.insertTextContent(FooterCursor, PageCount, False)
......@@ -113,19 +75,12 @@ sub H2Pdf
toc.IsProtected = false
document.Text.insertTextContent(Cursor, toc, false)
rem Cursor.ParaStyleName = "Text body"
rem Cursor.BreakType = 4 ' Insert Page Break After
rem document.Text.insertControlCharacter(Cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
rem Cursor.ParaStyleName = "Heading 1"
Cursor.gotoStart(false)
result = true
' loop over all following paragraphs
while result
result = Cursor.gotoNextParagraph(false)
if Cursor.ParaStyleName = "Heading 1" then
Cursor.BreakType = 4 ' Insert Page Break After
rem document.Text.insertControlCharacter(Cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
end if
wend
......@@ -134,77 +89,28 @@ sub H2Pdf
For i = 1 To 4
oLevel = toc.LevelFormat.getByIndex(i)
iCount = UBound(oLevel)
rem Dim newFormat(iCount + 2) As new com.sun.star.beans.PropertyValue
rem Dim newFormat(iCount + 2) As new com.sun.star.beans.PropertyValue
x = DimArray(5)
rem x = CreateUnoStruct("[][]com.sun.star.beans.PropertyValue")
rem x(0) = CreateUnoStruct("[]com.sun.star.beans.PropertyValue")
x = Array(linkStart, oLevel(0), oLevel(1), oLevel(2), oLevel(3), linkEnd)
old = oLevel(0)
rem ReDim linkStart(1) As New com.sun.star.beans.PropertyValue
rem ReDim linkEnd(1) As New com.sun.star.beans.PropertyValue
linkStart(0).Name = "TokenType"
linkStart(0).Value = "TokenHyperlinkStart"
linkStart(0).Handle = -1
linkStart(0).State = com.sun.star.beans.PropertyState.DIRECT_VALUE
rem linkStart(1).Name = old(0).Name
rem linkStart(1).Value = old(0).Value
rem linkStart(1).Handle = old(0).Handle
rem linkStart(1).State = old(0).State
linkEnd(0).Name = "TokenType"
linkEnd(0).Value = "TokenHyperlinkEnd"
linkEnd(0).Handle = -1
linkEnd(0).State = com.sun.star.beans.PropertyState.DIRECT_VALUE
rem linkEnd(1).Name = old(0).Name
rem linkEnd(1).Value = old(0).Value
rem linkEnd(1).Handle = old(0).Handle
rem linkEnd(1).State = old(0).State
rem For j = 0 To iCount
rem a = oLevel(j)
rem newFormat(j + 1, 0) = a(0)
rem newFormat(j + 1, 1) = a(1)
rem newFormat(j + 1, 0) = CreateUnoStruct("com.sun.star.beans.PropertyValue")
rem newFormat(j + 1, 0).Name = oLevel(j).Name
rem newFormat(j + 1).Value = oLevel(j).Value
rem newFormat(j + 1).Handle = oLevel(j).Handle
rem newFormat(j + 1).State = oLevel(j).State
rem Next
rem newFormat(iCount + 2, 0) = CreateUnoStruct("com.sun.star.beans.PropertyValue")
rem newFormat(iCount + 2, 0).Name = "TokenType"
rem newFormat(iCount + 2, 0).Value = "TokenHyperlinkEnd"
rem newFormat(iCount + 2, 0).Handle = -1
rem newFormat(iCount + 2, 0).State = com.sun.star.beans.PropertyState.DIRECT_VALUE
rem a = oLevel(1)
rem newFormat(iCount + 2, 1) = a(1)
rem oProperties = CreateUnoStruct("[]com.sun.star.beans.PropertyValue")
rem oProperties.Set "[]com.sun.star.beans.PropertyValue", newFormat
rem toc.LevelFormat.replaceByIndex(i, oLevel)
toc.LevelFormat.replaceByIndex(i, x)
next
next
dispatcher.executeDispatch(docs, ".uno:UpdateAll", "", 0, Array())
toc.update()
dispatcher.executeDispatch(docs, ".uno:UpdateAll", "", 0, Array())
toc.update()
toc.update()
dispatcher.executeDispatch(docs, ".uno:UpdateAll", "", 0, Array())
pdfTemp = "file:///C:/data/h2database/h2web/h2temp.pdf"
pdf = "file:///C:/data/h2database/h2web/h2.pdf"
pdfTemp = BaseDir & "h2web/h2temp.pdf"
pdf = BaseDir & "h2web/h2.pdf"
dim pdfProperties(1) as new com.sun.star.beans.PropertyValue
pdfProperties(0).Name = "FilterName"
......@@ -216,178 +122,3 @@ rem newFormat(iCount + 2, 1) = a(1)
ThisComponent.close(true)
end sub
sub Other
rem ----------------------------------------------------------------------
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem FooterCursor = Standard.FooterTextRight.Text.createTextCursor()
rem Standard.FooterTextRight.Text.insertTextContent(FooterCursor, PageNumber, False)
rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "DesignerDialog"
args3(0).Value = true
dispatcher.executeDispatch(document, ".uno:DesignerDialog", "", 0, args3())
rem ----------------------------------------------------------------------
dim args4(1) as new com.sun.star.beans.PropertyValue
args4(0).Name = "Param"
args4(0).Value = "Heading 1"
args4(1).Name = "Family"
args4(1).Value = 2
dispatcher.executeDispatch(document, ".uno:EditStyle", "", 0, args4())
rem ----------------------------------------------------------------------
dim args5(1) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Param"
args5(0).Value = "Text body"
args5(1).Name = "Family"
args5(1).Value = 2
dispatcher.executeDispatch(document, ".uno:EditStyle", "", 0, args5())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPageNumberField", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPageCountField", "", 0, Array())
rem ----------------------------------------------------------------------
dim args8(0) as new com.sun.star.beans.PropertyValue
args8(0).Name = "DesignerDialog"
args8(0).Value = false
dispatcher.executeDispatch(document, ".uno:DesignerDialog", "", 0, args8())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPagebreak", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:GoUp", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:InsertPagebreak", "", 0, Array())
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:InsertMultiIndex", "", 0, Array())
rem ----------------------------------------------------------------------
rem ----------------------------------------------------------------------
end sub
sub Footer
oDoc = ThisComponent
oStyles = oDoc.getStyleFamilies
oPS = oStyles.getByName("PageStyles")
Stan = oPS.getByName("HTML")
Stan.FooterIsOn = True
oText = Stan.FooterText
oText.setString("")
PageNumber = oDoc.createInstance("com.sun.star.text.TextField.PageNumber")
PageNumber.NumberingType = 4
PageCount = oDoc.createInstance("com.sun.star.text.TextField.PageCount")
PageCount.NumberingType = 4
FooterCursor = oText.Text.createTextCursor()
oText.insertString(FooterCursor, "Page ", False)
oText.insertTextContent(FooterCursor, PageNumber, False)
oText.insertString(FooterCursor, " of ", False)
oText.insertTextContent(FooterCursor, PageCount, False)
MsgBox "End"
end sub
sub Test
MsgBox "hallo"
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
dim FileProperties(0) As New com.sun.star.beans.PropertyValue
dim Url As String
dim StyleFamilies As Object
dim PageProperties as object
dim Standard as Object
dim PageNumber as Object
dim HContent as Object
dim HText as Object
dim MyPageStyle as object
end sub
sub Upate
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
end sub
sub Test2
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
document.Text.insertString(Cursor, "H2 Database Engine", False)
document.Text.insertControlCharacter(Cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
Cursor.ParaStyleName = "Text body"
document.Text.insertString(Cursor, "Version 1.0.76 (2008-08-02)", False)
document.Text.insertControlCharacter(Cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
Cursor.BreakType = 4 ' Insert Page Break After
document.Text.insertControlCharacter(Cursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False)
Cursor.ParaStyleName = "Heading 1"
rem ----------------------------------------------------------------------
end sub
sub ReadVersion
fileAccessService = createUnoService("com.sun.star.ucb.SimpleFileAccess")
Url = "file:///C:/data/h2database/h2/docs/html/version.txt"
inputStream = fileAccessService.openFileRead(Url)
textInputStream = createUnoService("com.sun.star.io.TextInputStream")
textInputStream.setInputStream(inputStream)
textInputStream.setEncoding("UTF-8")
s = textInputStream.readLine()
MsgBox s
end sub
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论