Пример #1
0
    PKGBUILD = loader.load('PKGBUILD.tmpl').generate(
        stds=stds,
        version=version,
        version_date=version_date.replace('-', ''),
        version_date_raw=version_date,
        cargo_version=cargo_version,
        rustfmt_version=rustfmt_version,
        clippy_version=clippy_version,
        clippy_url=clippy_url,
    )


def pre_build():
    if not debug:
        oldfiles = (glob.glob('*.xz') + glob.glob('*.xz.asc') +
                    glob.glob('*.part'))
        for f in oldfiles:
            os.unlink(f)

    with open('PKGBUILD', 'wb') as output:
        output.write(PKGBUILD)


def post_build():
    git_add_files(['PKGBUILD'])
    git_commit()


if __name__ == '__main__':
    single_main()
Пример #2
0
  loader = tornado.template.Loader('.')
  global PKGBUILD
  PKGBUILD = loader.load('PKGBUILD.tmpl').generate(
    stds = stds,
    version = version,
    version_date = version_date.replace('-', ''),
    version_date_raw = version_date,
    cargo_version = cargo_version,
    rustfmt_version = rustfmt_version,
    clippy_version = clippy_version,
    clippy_url = clippy_url,
  )

def pre_build():
  if not debug:
    oldfiles = (glob.glob('*.xz') + glob.glob('*.xz.asc') +
                glob.glob('*.part'))
    for f in oldfiles:
      os.unlink(f)

  with open('PKGBUILD', 'wb') as output:
    output.write(PKGBUILD)

def post_build():
  git_add_files(['PKGBUILD'])
  git_commit()

if __name__ == '__main__':
  single_main()