Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Bug 1831168 - consistently read the version number from taskgraph par…
Browse files Browse the repository at this point in the history
…ams instead of version.txt
  • Loading branch information
jcristau committed May 4, 2023
1 parent c5040e3 commit 9b41c2f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 14 deletions.
5 changes: 0 additions & 5 deletions taskcluster/android_taskgraph/build_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ def get_components():
]


def get_version():
with open(os.path.join(PROJECT_DIR, "version.txt")) as fh:
return fh.read().strip()


def get_path(component):
return _read_build_config(ANDROID_COMPONENTS_DIR)["projects"][component]["path"]

Expand Down
5 changes: 2 additions & 3 deletions taskcluster/android_taskgraph/transforms/beetmover.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import resolve_keyed_by

from ..build_config import get_version
from .build_components import craft_path_version, get_nightly_version

transforms = TransformSequence()
Expand Down Expand Up @@ -36,7 +35,7 @@ def resolve_keys(config, tasks):

@transforms.add
def set_artifact_map(config, tasks):
version = get_version()
version = config.params["version"]
nightly_version = get_nightly_version(config, version)

for task in tasks:
Expand Down Expand Up @@ -70,7 +69,7 @@ def set_artifact_map(config, tasks):

@transforms.add
def add_version(config, tasks):
version = get_version()
version = config.params["version"]
nightly_version = get_nightly_version(config, version)

for task in tasks:
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/android_taskgraph/transforms/build_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from taskgraph.transforms.base import TransformSequence
from taskgraph.util.schema import resolve_keyed_by

from ..build_config import get_extensions, get_path, get_version
from ..build_config import get_extensions, get_path

transforms = TransformSequence()

Expand Down Expand Up @@ -50,7 +50,7 @@ def handle_coverage(config, tasks):
@transforms.add
def interpolate_missing_values(config, tasks):
timestamp = _get_timestamp(config)
version = get_version()
version = config.params["version"]
nightly_version = get_nightly_version(config, version)

for task in tasks:
Expand Down Expand Up @@ -129,7 +129,7 @@ def set_external_gradle_dependencies(config, tasks):
@transforms.add
def add_artifacts(config, tasks):
timestamp = _get_timestamp(config)
version = get_version()
version = config.params["version"]
nightly_version = get_nightly_version(config, version)

for task in tasks:
Expand Down
4 changes: 1 addition & 3 deletions taskcluster/android_taskgraph/util/scriptworker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
from taskgraph.util.taskcluster import get_artifact_prefix
from taskgraph.util.yaml import load_yaml

from ..release_promotion import read_version_file

cached_load_yaml = memoize(load_yaml)


Expand Down Expand Up @@ -260,7 +258,7 @@ def generate_beetmover_artifact_map(config, job, **kwargs):
for key in platforms.keys():
resolve_keyed_by(platforms, key, job["label"], platform=platform)

version = read_version_file()
version = config.params["version"]
upload_date = datetime.fromtimestamp(config.params["build_date"])

if job["attributes"]["build-type"] == "fenix-nightly":
Expand Down

0 comments on commit 9b41c2f

Please sign in to comment.