Commit cd4503a5 authored by Aneta Steimarova's avatar Aneta Steimarova

#910 Moved copyright file into desktop and made making changelog by code.

parent fe28f7e3
......@@ -310,6 +310,8 @@ task debugDeb (dependsOn: [classes, debugJar]) {
}
def prepareFiles(String version) {
delete "build/debian/$version"
def debianFolder = new File("desktop/build/debian/$version");
debianFolder.mkdirs();
......@@ -342,6 +344,30 @@ def prepareFiles(String version) {
"\n" +
"java -jar /lib/tablexia$ver" + "/Tablexia.jar"
String changelogMessage
def fileOfChanges = new File("desktop/change-log")
if(fileOfChanges.exists()){
changelogMessage = new File('desktop/change-log').text
}
else{
changelogMessage = "Updated to version $tablexiaVersionName"
println 'File change-log in tablexia/deskop does not exists. ' +
'If you want to write down news into changelog, please, create tablexia/desktop/change-log with description of what is new.'
}
def changelogFile = new File("$debianFolder/changelog")
changelogFile.createNewFile()
changelogFile.text = "Tablexia trusty; urgency low\n" +
"* Rebuild\n" +
"CZ.NIC, z.s.p.o. (http://www.nic.cz/)\n" +
"$changelogMessage\n"
exec {
commandLine = ['gzip',"changelog"]
workingDir = "build/debian/$version/"
}
if("$version" == "release") version=""
else version = "$version" + "_"
def tablexiaDesktop = new File("$debianFolder" + "/tablexia$ver" + ".desktop")
......@@ -404,7 +430,7 @@ def createDebPackage(String version) {
//copy copyright file
copy {
from "../desktop/assets/copyright"
from "../desktop/copyright"
into "../$packageFolder/usr/share/doc/$tablexiaPackage" + "/"
}
......@@ -416,7 +442,7 @@ def createDebPackage(String version) {
// copy changelog
copy {
from "../desktop/assets/changelog.gz"
from "../desktop/build/debian/$version" + "/changelog.gz"
into "../$packageFolder/usr/share/doc/$tablexiaPackage" + "/"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment