Beispiel #1
0
def ivy_version(btn, path = None):
  if path == None:
    azp = os.path.join(core.home_path(), '.az', 'core')
    path = os.path.join(azp, btn, 'teamcity-ivy.xml')

  bt = open(path, 'r')
  btc = bt.read()
  bt.close()

  return btc[btc.find('revision="') + 10:].split('"')[0]
Beispiel #2
0
  def execute(self, argv):
    opts = self.make_opts()
    (options, args) = opts.parse_args(argv)

    if options.force:
      azp = os.path.join(core.home_path(), '.az', 'core')
      core.rmtree(azp)
    else:
      self._check()

    self.ctx.defaults['KOTLIN_CP'] = core.find_kotlin()
Beispiel #3
0
  def _check(self):
    azp = os.path.join(core.home_path(), '.az', 'core')
    for km in core.kl:
      for bt in km:
        ivy = km[bt][0]

        url = core.jbtc + bt + '/latest.lastSuccessful/' + ivy
        fdivy, tivy = tempfile.mkstemp(suffix='.xml')
        core.download(url, tivy, False)

        btv0 = ivy_version(bt, tivy)
        btv1 = ivy_version(bt)
        os.close(fdivy)
        os.unlink(tivy)
        if btv0 != btv1:
          for lib in km[bt]:
            local = os.path.join(azp, bt, lib)
            os.remove(local)
Beispiel #4
0
def azc():
  return core.dir_sure(os.path.join(core.home_path(), '.az', 'cache'))