aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/large_files.py
diff options
context:
space:
mode:
authorv-korovin <v-korovin@yandex-team.ru>2022-02-10 16:46:21 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:21 +0300
commit637de640c39b46c13f29619057a54f4cf3e1241b (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /build/plugins/large_files.py
parentc4e0c5d2f245076d63ccff1004c755ca0cc5d27b (diff)
downloadydb-637de640c39b46c13f29619057a54f4cf3e1241b.tar.gz
Restoring authorship annotation for <v-korovin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'build/plugins/large_files.py')
-rw-r--r--build/plugins/large_files.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/build/plugins/large_files.py b/build/plugins/large_files.py
index aa1a418a2f..33a78d7110 100644
--- a/build/plugins/large_files.py
+++ b/build/plugins/large_files.py
@@ -7,22 +7,22 @@ PLACEHOLDER_EXT = "external"
def onlarge_files(unit, *args):
"""
- @usage LARGE_FILES([AUTOUPDATED] Files...)
+ @usage LARGE_FILES([AUTOUPDATED] Files...)
- Use large file ether from working copy or from remote storage via placeholder <File>.external
- If <File> is present locally (and not a symlink!) it will be copied to build directory.
- Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
+ Use large file ether from working copy or from remote storage via placeholder <File>.external
+ If <File> is present locally (and not a symlink!) it will be copied to build directory.
+ Otherwise macro will try to locate <File>.external, parse it retrieve ot during build phase.
"""
args = list(args)
-
- if args and args[0] == 'AUTOUPDATED':
- args = args[1:]
-
+
+ if args and args[0] == 'AUTOUPDATED':
+ args = args[1:]
+
for arg in args:
- if arg == 'AUTOUPDATED':
- unit.message(["warn", "Please set AUTOUPDATED argument before other file names"])
- continue
-
+ if arg == 'AUTOUPDATED':
+ unit.message(["warn", "Please set AUTOUPDATED argument before other file names"])
+ continue
+
src = unit.resolve_arc_path(arg)
if src.startswith("$S"):
msg = "Used local large file {}. Don't forget to run 'ya upload --update-external' and commit {}.{}".format(src, src, PLACEHOLDER_EXT)
@@ -31,9 +31,9 @@ def onlarge_files(unit, *args):
else:
out_file = strip_roots(os.path.join(unit.path(), arg))
external = "{}.{}".format(arg, PLACEHOLDER_EXT)
- from_external_cmd = [external, out_file, 'OUT_NOAUTO', arg]
- if os.path.dirname(arg):
- from_external_cmd.extend(("RENAME", os.path.basename(arg)))
- unit.on_from_external(from_external_cmd)
+ from_external_cmd = [external, out_file, 'OUT_NOAUTO', arg]
+ if os.path.dirname(arg):
+ from_external_cmd.extend(("RENAME", os.path.basename(arg)))
+ unit.on_from_external(from_external_cmd)
unit.onadd_check(['check.external', external])