Skip to content

Commit

Permalink
Merge pull request #196 from truenas/NAS-113190-22.02-RC.1
Browse files Browse the repository at this point in the history
NAS-113190 / 22.02-RC.1 / Allow checking out all repos by providing an override (by sonicaj)
  • Loading branch information
william-gr authored Nov 3, 2021
2 parents bd590f8 + dda7921 commit 8db73c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions scale_build/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
SIGNING_PASSWORD = os.getenv('SIGNING_PASSWORD')
SKIP_SOURCE_REPO_VALIDATION = bool(int(os.getenv('SKIP_SOURCE_REPO_VALIDATION') or '0'))
TRAIN = os.getenv('TRUENAS_TRAIN')
TRUENAS_BRANCH_OVERRIDE = os.getenv('TRUENAS_BRANCH_OVERRIDE')
TRY_BRANCH_OVERRIDE = os.getenv('TRY_BRANCH_OVERRIDE')
if os.getenv('TRUENAS_VERSION'):
VERSION = os.getenv('TRUENAS_VERSION')
Expand Down
6 changes: 4 additions & 2 deletions scale_build/packages/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import shutil

from scale_build.config import BRANCH_OVERRIDES, TRY_BRANCH_OVERRIDE
from scale_build.config import BRANCH_OVERRIDES, TRUENAS_BRANCH_OVERRIDE, TRY_BRANCH_OVERRIDE
from scale_build.exceptions import CallError
from scale_build.utils.git_utils import (
branch_checked_out_locally, branch_exists_in_repository, create_branch,
Expand Down Expand Up @@ -63,7 +63,9 @@ def existing_branch(self):
return retrieve_git_branch(self.source_path)

def get_branch_override(self):
gh_override = BRANCH_OVERRIDES.get(self.name)
# We prioritise TRUENAS_BRANCH_OVERRIDE over any individual branch override
# keeping in line with the behavior we used to have before
gh_override = TRUENAS_BRANCH_OVERRIDE or BRANCH_OVERRIDES.get(self.name)

# TRY_BRANCH_OVERRIDE is a special use-case. It allows setting a branch name to be used
# during the checkout phase, only if it exists on the remote.
Expand Down

0 comments on commit 8db73c6

Please sign in to comment.