Compare commits
No commits in common. "0a18586201c8e93c3245e4eb570730083694d62f" and "41dcbe1718f9b18302abe0d800ccbe297cd36253" have entirely different histories.
0a18586201
...
41dcbe1718
1 changed files with 6 additions and 26 deletions
|
@ -80,9 +80,6 @@ class Build(loaih.RemoteBuild):
|
||||||
|
|
||||||
def calculate(self):
|
def calculate(self):
|
||||||
"""Calculate exclusions and other variables."""
|
"""Calculate exclusions and other variables."""
|
||||||
|
|
||||||
print("--- Calculate Phase ---")
|
|
||||||
|
|
||||||
# AppName
|
# AppName
|
||||||
if self.query in { 'prerelease', 'daily' }:
|
if self.query in { 'prerelease', 'daily' }:
|
||||||
self.appname = 'LibreOfficeDev'
|
self.appname = 'LibreOfficeDev'
|
||||||
|
@ -135,9 +132,6 @@ class Build(loaih.RemoteBuild):
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
"""Checking if the requested AppImage has been already built."""
|
"""Checking if the requested AppImage has been already built."""
|
||||||
|
|
||||||
print("--- Check Phase ---")
|
|
||||||
|
|
||||||
if len(self.appimagefilename) != 2:
|
if len(self.appimagefilename) != 2:
|
||||||
self.calculate()
|
self.calculate()
|
||||||
|
|
||||||
|
@ -190,9 +184,6 @@ class Build(loaih.RemoteBuild):
|
||||||
|
|
||||||
def download(self):
|
def download(self):
|
||||||
"""Downloads the contents of the URL as it was a folder."""
|
"""Downloads the contents of the URL as it was a folder."""
|
||||||
|
|
||||||
print("--- Download Phase ---")
|
|
||||||
|
|
||||||
print(f"Started downloads for {self.version}. Please wait.")
|
print(f"Started downloads for {self.version}. Please wait.")
|
||||||
for arch in self.arch:
|
for arch in self.arch:
|
||||||
# Checking if a valid path has been provided
|
# Checking if a valid path has been provided
|
||||||
|
@ -236,8 +227,6 @@ class Build(loaih.RemoteBuild):
|
||||||
def build(self):
|
def build(self):
|
||||||
"""Building all the versions."""
|
"""Building all the versions."""
|
||||||
|
|
||||||
print("--- Building Phase ---")
|
|
||||||
|
|
||||||
for arch in self.arch:
|
for arch in self.arch:
|
||||||
if self.built[arch]:
|
if self.built[arch]:
|
||||||
# Already built for arch or path not available. User has already been warned.
|
# Already built for arch or path not available. User has already been warned.
|
||||||
|
@ -375,6 +364,8 @@ class Build(loaih.RemoteBuild):
|
||||||
), env={ "VERSION": self.appversion }, check=True)
|
), env={ "VERSION": self.appversion }, check=True)
|
||||||
|
|
||||||
print(f"Built AppImage version {self.appversion}")
|
print(f"Built AppImage version {self.appversion}")
|
||||||
|
# Setting it to built.
|
||||||
|
self.built[arch] = True
|
||||||
|
|
||||||
# Cleanup phase, before new run.
|
# Cleanup phase, before new run.
|
||||||
for deb in glob.glob(self.appnamedir + '/*.deb'):
|
for deb in glob.glob(self.appnamedir + '/*.deb'):
|
||||||
|
@ -387,23 +378,15 @@ class Build(loaih.RemoteBuild):
|
||||||
def checksums(self):
|
def checksums(self):
|
||||||
"""Create checksums of the built versions."""
|
"""Create checksums of the built versions."""
|
||||||
# Skip checksum if initally the build was already found in the storage directory
|
# Skip checksum if initally the build was already found in the storage directory
|
||||||
|
|
||||||
print("--- Checksum Phase ---")
|
|
||||||
|
|
||||||
if all(self.built[arch] for arch in self.arch):
|
if all(self.built[arch] for arch in self.arch):
|
||||||
return
|
return
|
||||||
|
|
||||||
os.chdir(self.appnamedir)
|
os.chdir(self.appnamedir)
|
||||||
for arch in self.arch:
|
for arch in self.arch:
|
||||||
if not self.built[arch]:
|
if self.built[arch]:
|
||||||
# Here's the contrary. A newly built package has not yet been
|
|
||||||
# marked as built.
|
|
||||||
for item in [ self.appimagefilename[arch], self.zsyncfilename[arch] ]:
|
for item in [ self.appimagefilename[arch], self.zsyncfilename[arch] ]:
|
||||||
itempath = os.path.join(self.appnamedir, item)
|
# For any built arch, find out if a file exist.
|
||||||
if os.path.exists(itempath):
|
self.__create_checksum__(item)
|
||||||
# For any built arch, find out if a file exist.
|
|
||||||
print(f"DEBUG: checkumming {item}.")
|
|
||||||
self.__create_checksum__(item)
|
|
||||||
|
|
||||||
|
|
||||||
def __create_checksum__(self, file):
|
def __create_checksum__(self, file):
|
||||||
|
@ -422,7 +405,7 @@ class Build(loaih.RemoteBuild):
|
||||||
def publish(self):
|
def publish(self):
|
||||||
"""Moves built versions to definitive storage."""
|
"""Moves built versions to definitive storage."""
|
||||||
|
|
||||||
print("--- Publish Phase ---")
|
print("DEBUG: reached publish.")
|
||||||
|
|
||||||
if all(self.built[arch] for arch in self.arch):
|
if all(self.built[arch] for arch in self.arch):
|
||||||
# All files are already present in the full_path
|
# All files are already present in the full_path
|
||||||
|
@ -458,9 +441,6 @@ class Build(loaih.RemoteBuild):
|
||||||
|
|
||||||
def generalize_and_link(self, chdir = 'default'):
|
def generalize_and_link(self, chdir = 'default'):
|
||||||
"""Creates the needed generalized files if needed."""
|
"""Creates the needed generalized files if needed."""
|
||||||
|
|
||||||
print("--- Generalize and Link Phase ---")
|
|
||||||
|
|
||||||
# If called with a pointed version, no generalize and link necessary.
|
# If called with a pointed version, no generalize and link necessary.
|
||||||
if not self.branch_version:
|
if not self.branch_version:
|
||||||
return
|
return
|
||||||
|
|
Reference in a new issue