Exemplo n.º 1
0
def _create_build_with_latest_version():
    version = _get_latest_commcare_build_version()

    commcare_version_build = next((cc_build
                                   for cc_build in CommCareBuild.all_builds()
                                   if cc_build.version == version), None)
    if commcare_version_build is None:
        CommCareBuild.create_without_artifacts(version, None)
        _update_commcare_build_menu(version)
Exemplo n.º 2
0
 def _create_build_with_version(self, version):
     if any(build.version == version
            for build in CommCareBuild.all_builds()):
         self.stdout.write(
             f"A build for version {version} already exists. You're up-to-date!"
         )
     else:
         CommCareBuild.create_without_artifacts(version, None)
         _update_commcare_build_menu(version)
         self.stdout.write(f"Added build for version {version}.")
Exemplo n.º 3
0
def get_all(request):
    builds = sorted(CommCareBuild.all_builds(), key=lambda build: build.time)
    return render_to_response(request, 'builds/all.html', {'builds': builds})
Exemplo n.º 4
0
def get_all(request):
    builds = sorted(CommCareBuild.all_builds(), key=lambda build: build.time)
    return render(request, 'builds/all.html', {'builds': builds})