Commit 65977199 authored by Stephane Mankowski's avatar Stephane Mankowski
Browse files

New release process for appimage

parent dcbbb3e4
skrooge (2.27.0)
*Correction bug 440271: 2.26.1 still installs skrooge_unit.knsrc to depreciated /etc/xdg/ location
*Feature: New release process for appimage
-- Stephane MANKOWSKI <stephane@mankowski.fr> xxx
......
......@@ -130,26 +130,26 @@ class Releasor(object):
os.remove(tarfile)
cmd = ['tar', '-cJf', tarfile, p]
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
self.logfile.write('### '+' '.join(cmd)+'\n')
if rc == 0:
cmd = ['gpg2', '--armor', '--detach-sig', '-o', tarfile+'.sig', tarfile]
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
if rc == 0:
print("Skrooge "+args.version+" released\n\nHi,\n\nCould you publish the following files in skrooge/"+("stable" if args.stable else "unstable")+"?\n")
cmd = ['sha256sum', tarfile]
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd)
if rc == 0:
cmd = ['sha256sum', tarfile+'.sig']
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd)
print("Thank you.\nRegards.\n" )
self.logfile.write('### '+' '.join(cmd)+'\n')
if rc == 0:
shutil.rmtree(p)
print('# '+("DONE" if rc == 0 else "FAILED"))
return rc
def generatePublicationMessage(self, args, filename):
cmd = ['gpg2', '--armor', '--detach-sig', '-o', filename+'.sig', filename]
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
if rc == 0:
print("Skrooge "+args.version+" released\n\nHi,\n\nCould you publish the following files in skrooge/"+("stable" if args.stable else "unstable")+"?\n")
cmd = ['sha256sum', filename]
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd)
if rc == 0:
cmd = ['sha256sum', filename+'.sig']
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd)
print("Thank you.\nRegards.\n" )
def modify(self, args):
print('# Get dsc')
os.chdir(self.workdingDir)
......@@ -233,24 +233,28 @@ class Releasor(object):
def publishKDE(self, args):
print('# Publish on kde')
os.chdir(self.workdingDir)
rc = 0
if not args.publish:
print("# Publication ignored")
os.chdir(self.workdingDir)
cmd = ['kdecp5', 'skrooge-'+args.version+'.tar.xz', 'ftp://upload.kde.org/incoming']
filename = "skrooge-"+args.version+'-x86_64.AppImage' if args.appimage else 'skrooge-'+args.version+'.tar.xz'
self.generatePublicationMessage(args, filename)
cmd = ['kdecp5', filename, 'ftp://upload.kde.org/incoming']
if not args.publish:
print('# '+' '.join(cmd)+'\n')
else:
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
if rc == 0:
self.logfile.write('### '+' '.join(cmd)+'\n')
cmd = ['kdecp5', 'skrooge-'+args.version+'.tar.xz.sig', 'ftp://upload.kde.org/incoming']
if not args.publish:
print('# '+' '.join(cmd)+'\n')
else:
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
if rc != 0:
print("# "+' '.join(cmd)+" FAILED. Check if already existing")
cmd = ['kdecp5', filename + '.sig', 'ftp://upload.kde.org/incoming']
self.logfile.write('### '+' '.join(cmd)+'\n')
rc = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile)
if rc != 0:
print("# "+' '.join(cmd)+" FAILED. Check if already existing")
print('# '+("DONE" if rc == 0 else "FAILED"))
return rc
......@@ -289,7 +293,7 @@ class Releasor(object):
if rc == 0:
appimage_file = [os.path.join(self.workdingDir, "out/"+o) for o in os.listdir("./out") if o.endswith('.AppImage')][0]
shutil.move(appimage_file, targteappimage)
shutil.move(appimage_file, targteappimage)
print('# '+("DONE" if rc == 0 else "FAILED"))
return rc
......@@ -351,10 +355,10 @@ def main():
if(rc == 0 and not (args.appimage or args.snap)): rc=r.makeTarFile(args)
if(rc == 0 and not (args.appimage or args.snap)): rc=r.updateTarFile(args)
if(rc == 0 and not (args.appimage or args.snap)): rc=r.modify(args)
if(rc == 0 and not (args.appimage or args.snap)): rc=r.publishLaunchpad(args)
if(rc == 0 and not (args.appimage or args.snap)): rc=r.publishKDE(args)
if(rc == 0 and args.appimage): rc=r.buildAppImage(args)
if(rc == 0 and args.snap): rc=r.buildSnap(args)
if(rc == 0 and not (args.appimage or args.snap)): rc=r.publishLaunchpad(args)
if(rc == 0 and not (args.snap)): rc=r.publishKDE(args)
print("#####################")
print("# End of release #" if rc == 0 else "# FAILURE #")
print("#####################")
......
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