Ejemplo n.º 1
0
current = Version(alpine_base_config.read()["args"]["BUILD_FROM_TAG"])

request = requests.get(URL).json()
tags = sorted(
    [
        x["name"]
        for x in request["results"]
        if x["name"][0].isdigit() and x["name"] not in skip and "." in x["name"]
    ]
)

upstream = Version(tags.pop())

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)

alpine_base_config.update("args.BUILD_FROM_TAG", upstream.string)
alpine_base_config.update("tags", upstream.tags)

alpine_node_config.update("args.BUILD_FROM_TAG", upstream.string)
alpine_python_config.update("args.BUILD_FROM_TAG", upstream.string)
alpine_s6_base_config.update("args.BUILD_FROM_TAG", upstream.string)
alpine_s6_base_config.update("tags", upstream.tags)

with open("./commit", "w") as commit:
    commit.write(f"Update Alpine from {current.string} to {upstream.string}")

with open("./labels", "w") as labels:
    labels.write("alpine/base")
Ejemplo n.º 2
0
devcontainer_node_config = JsonFile("./containerfiles/devcontainer/node/config.json")
devcontainer_frontend_config = JsonFile(
    "./containerfiles/devcontainer/frontend/config.json"
)

current = Version(install_node_version.read()["node"])

request = requests.get(URL).text
upstream = Version(request.split(" Current")[0].split("Download ")[-1])

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)


install_node_version.update("node", upstream.string)

alpine_node_config.update("tags", upstream.tags)
alpine_s6_node_config.update("tags", upstream.tags)
alpine_s6_node_config.update("args.BUILD_FROM_TAG", upstream.string)

debian_node_config.update("tags", upstream.tags)
debian_s6_node_config.update("tags", upstream.tags)
debian_s6_node_config.update("args.BUILD_FROM_TAG", upstream.string)

devcontainer_node_config.update("args.BUILD_FROM_TAG", upstream.string)
devcontainer_node_config.update("tags", upstream.tags)
devcontainer_frontend_config.update("args.BUILD_FROM_TAG", upstream.string)

with open("./commit", "w") as commit:
    commit.write(f"Update NodeJS from {current.string} to {upstream.string}")
Ejemplo n.º 3
0
"""Update yarn."""
from typing import TYPE_CHECKING
import requests

from version import Version
from jsonfile import JsonFile
from github import github_release

if TYPE_CHECKING:
    from .version import Version
    from .jsonfile import JsonFile

install_yarn_version = JsonFile("./include/install/node/versions.json")

current = Version(install_yarn_version.read()["yarn"])
upstream = Version(github_release("yarnpkg/yarn"))

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)

install_yarn_version.update("yarn", upstream.string)

with open("./commit", "w") as commit:
    commit.write(f"Update Yarn from {current.string} to {upstream.string}")

with open("./labels", "w") as labels:
    labels.write("node,debian/node,alpine/node")
Ejemplo n.º 4
0
"""Update ghcli."""
from typing import TYPE_CHECKING
import requests

from version import Version
from jsonfile import JsonFile
from github import github_release

if TYPE_CHECKING:
    from .version import Version
    from .jsonfile import JsonFile

install_ghcli_version = JsonFile("./include/install/ghcli/versions.json")

current = Version(install_ghcli_version.read()["ghcli"])
upstream = Version(github_release("cli/cli"))

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)

install_ghcli_version.update("ghcli", upstream.string)

with open("./commit", "w") as commit:
    commit.write(
        f"Update GitHub CLI from {current.string} to {upstream.string}")

with open("./labels", "w") as labels:
    labels.write("devcontainer")
Ejemplo n.º 5
0
    "./containerfiles/debian-s6/python/config.json")
devcontainer_integration = JsonFile(
    "./containerfiles/devcontainer/integration/config.json")
devcontainer_python = JsonFile(
    "./containerfiles/devcontainer/python/config.json")

current = Version(install_python_version.read()["python"])

request = requests.get(URL).text
upstream = Version(request.split(">Download Python ")[2].split("<")[0])

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)

install_python_version.update("python", upstream.string)
alpine_python_config.update("tags", upstream.tags)
alpine_s6_python_config.update("tags", upstream.tags)
alpine_s6_python_config.update("args.BUILD_FROM_TAG", upstream.string)
debian_python_config.update("tags", upstream.tags)
debian_s6_python_config.update("tags", upstream.tags)
debian_s6_python_config.update("args.BUILD_FROM_TAG", upstream.string)
devcontainer_integration.update("args.BUILD_FROM_TAG", upstream.string)
devcontainer_python.update("args.BUILD_FROM_TAG", upstream.string)
devcontainer_python.update("tags", upstream.tags)

with open("./commit", "w") as commit:
    commit.write(f"Update Python from {current.string} to {upstream.string}")

with open("./labels", "w") as labels:
    labels.write("python,debian/python,alpine/python")
Ejemplo n.º 6
0
"""Update s6."""
from typing import TYPE_CHECKING
import requests

from version import Version
from jsonfile import JsonFile
from github import github_release

if TYPE_CHECKING:
    from .version import Version
    from .jsonfile import JsonFile

install_s6_version = JsonFile("./include/install/s6/versions.json")

current = Version(install_s6_version.read()["s6"])
upstream = Version(github_release("just-containers/s6-overlay"))

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)

install_s6_version.update("s6", upstream.string)

with open("./commit", "w") as commit:
    commit.write(f"Update S6 from {current.string} to {upstream.string}")

with open("./labels", "w") as labels:
    labels.write("S6")
Ejemplo n.º 7
0
debian_python_config = JsonFile("./containerfiles/debian/python/config.json")

current = Version(
    debian_base_config.read()["args"]["BUILD_FROM_TAG"].split("-")[0])

request = requests.get(URL).json()
tags = [
    x["name"] for x in request
    if x["name"][0].isdigit() and x["name"] not in skip and "." in x["name"]
    and "-slim" in x["name"] and int(x["name"].split(".")[0]) >= 10
]

upstream = Version(tags.pop().split("-")[0])

if current == upstream:
    print(f"Nothing to do, both current and upstream is {current}")
    exit(0)

debian_base_config.update("args.BUILD_FROM_TAG", f"{upstream.string}-slim")
debian_base_config.update("tags", upstream.tags)

debian_node_config.update("args.BUILD_FROM_TAG", upstream.string)
debian_python_config.update("args.BUILD_FROM_TAG", upstream.string)
debian_s6_base_config.update("args.BUILD_FROM_TAG", upstream.string)
debian_s6_base_config.update("tags", upstream.tags)

with open("./commit", "w") as commit:
    commit.write(f"Update Debian from {current.string} to {upstream.string}")

with open("./labels", "w") as labels:
    labels.write("debian/base")