def main():

    # check we're not top level
    if os.path.exists('./application.py'):
        print 'You cannot run these tools from the top level directory'
        sys.exit(1)

    # remove appstream
    if os.path.exists('./appstream'):
        shutil.rmtree('./appstream')
    if os.path.exists('./icons'):
        shutil.rmtree('./icons')

    # the status HTML page goes here too
    if not os.path.exists('./screenshots'):
        os.makedirs('./screenshots')

    files_all = glob.glob("./packages/*.rpm")
    files = _do_newest_filtering(files_all)
    files.sort()

    log = LoggerItem()
    job = Build()

    for f in files:
        log.update_key(f)
        try:
            job.build(f)
        except Exception as e:
            log.write(LoggerItem.WARNING, str(e))
    job.write_appstream()
예제 #2
0
def build():
    "Build your documentation"

    docs_path = Path("docs")
    config = Config.parse_yaml(docs_path / "pagepeach.yaml")

    build = Build(config)
    build.build(docs_path)
예제 #3
0
def upload():
    file = request.files['build']
    if file and allowed_file(file.filename):
        filename = secure_filename(file.filename)
        file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
        bObj = Build()
        bObj.build(app.config["UPLOAD_FOLDER"], app.config['UNZIP_FOLDER'],
                   app.config["FILE_NAME"])
    return render_template("success.html")
예제 #4
0
def main():

    # remove appstream
    if os.path.exists('./appstream'):
        shutil.rmtree('./appstream')
    if os.path.exists('./icons'):
        shutil.rmtree('./icons')

    files = glob.glob("./packages/*.rpm")
    files.sort()

    job = Build()
    for f in files:
        try:
            job.build(f)
        except Exception as e:
            print 'WARNING\t', f, str(e)
from build import Build

import shutil

if __name__ == "__main__":
    appBuilder = Build()
    appBuilder.build()
    shutil.make_archive(appBuilder.packageName, 'zip', appBuilder.packageName)