-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3652 from emissary-ingress/flynn/dev/allow-untracked
Support starting a release with untracked files
- Loading branch information
Showing
4 changed files
with
56 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,25 @@ cut an RC from; that you're in the right repo, that you're on the | |
right branch, that all of the subtrees are up-to-date... | ||
""" | ||
|
||
import os.path | ||
from os import getenv | ||
from typing import Generator | ||
|
||
import sys | ||
import time | ||
|
||
import os.path | ||
|
||
from os import getenv | ||
from contextlib import contextmanager | ||
from typing import Generator | ||
|
||
from lib import assert_eq, git_check_clean, vX, vY, re_ga | ||
from lib import assert_eq, git_check_clean, parse_bool, vX, vY, re_ga | ||
from lib.uiutil import Checker, CheckResult, run | ||
from lib.uiutil import run_txtcapture as run_capture | ||
|
||
|
||
DEFAULT_REPO = '[email protected]:emissary-ingress/emissary' | ||
|
||
|
||
def main(next_ver: str, quiet: bool = False) -> int: | ||
def main(next_ver: str, quiet: bool = False, allow_untracked: bool = False) -> int: | ||
print(f'Starting work on "v{next_ver}"...') | ||
print() | ||
remote_repo = getenv('AMBASSADOR_RELEASE_REPO_OVERRIDE') | ||
|
@@ -53,7 +56,7 @@ def main(next_ver: str, quiet: bool = False) -> int: | |
raise Exception(f"Not in {toplevel}") | ||
|
||
with check("You're in a clean checkout"): | ||
git_check_clean() | ||
git_check_clean(allow_untracked=allow_untracked) | ||
|
||
# Cache the name of our remote... | ||
remote_name = f'{remote_repo}.git' if is_private else 'origin' | ||
|
@@ -125,6 +128,8 @@ if __name__ == '__main__': | |
args = sys.argv[1:] | ||
quiet = False | ||
|
||
allow_untracked = parse_bool(getenv("ALLOW_UNTRACKED", "false")) | ||
|
||
if args and (args[0] == '--quiet'): | ||
quiet = True | ||
args.pop(0) | ||
|
@@ -133,4 +138,4 @@ if __name__ == '__main__': | |
sys.stderr.write(f"Usage: {os.path.basename(sys.argv[0])} X.Y.Z\n") | ||
sys.exit(2) | ||
|
||
sys.exit(main(next_ver=args[0], quiet=quiet)) | ||
sys.exit(main(next_ver=args[0], quiet=quiet, allow_untracked=allow_untracked)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters