Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit 3cb1605

Browse files
author
Jinlin Zhang
authored
Make release process work (#2464)
* Added cache to CircleCI * Revert "Added cache to CircleCI" This reverts commit 573db13. * Upgraded to Python3 for docker build * Upgraded to Python3 for docker build * Upgrade Buck Release to python3 * Pass release info to ant build * Fixed ant build for Windows
1 parent c527299 commit 3cb1605

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

build.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@
117117
<isset property="jdk8_or_higher"/>
118118
</and>
119119
</condition>
120+
<!-- Overridden by ant command line arguments-->
121+
<property name="release.version" value=""/>
122+
<property name="release.timestamp" value=""/>
120123

121124
<fileset dir="${third-party.dir}/java" id="buck.jars">
122125
<include name="args4j/args4j-2.0.30.jar" />
@@ -1056,6 +1059,10 @@
10561059
<arg value="programs/gen_buck_info.py"/>
10571060
<arg value="--java-version"/>
10581061
<arg value="${java.version}"/>
1062+
<arg value="--release-version"/>
1063+
<arg value="${release.version}"/>
1064+
<arg value="--release-timestamp"/>
1065+
<arg value="${release.timestamp}"/>
10591066
</exec>
10601067
</target>
10611068

programs/gen_buck_info.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@
2929

3030
def main(argv):
3131
parser = argparse.ArgumentParser()
32-
parser.add_argument("--release-version", help="The buck release version")
3332
parser.add_argument(
34-
"--release-timestamp", help="The unix timestamp when the release happened"
33+
"--release-version",
34+
nargs = "?",
35+
default = None,
36+
help="The buck release version")
37+
parser.add_argument(
38+
"--release-timestamp",
39+
nargs = "?",
40+
default = None,
41+
help="The unix timestamp when the release happened"
3542
)
3643
parser.add_argument(
3744
"--java-version",
@@ -52,7 +59,7 @@ def main(argv):
5259
candidate_paths = []
5360
vcs_module = None
5461
while vcs_module is None and os.path.dirname(path) != path:
55-
while not os.path.exists(os.path.join(path, ".buckconfig")):
62+
while not os.path.exists(os.path.join(path, ".buckconfig")) and os.path.dirname(path) != path:
5663
path = os.path.dirname(path)
5764
for vcs_dir, module in SUPPORTED_VCS.items():
5865
if os.path.exists(os.path.join(path, vcs_dir)):

0 commit comments

Comments
 (0)