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

Commit

Permalink
Make release process work (#2464)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Jinlin Zhang authored May 14, 2020
1 parent c527299 commit 3cb1605
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
7 changes: 7 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<isset property="jdk8_or_higher"/>
</and>
</condition>
<!-- Overridden by ant command line arguments-->
<property name="release.version" value=""/>
<property name="release.timestamp" value=""/>

<fileset dir="${third-party.dir}/java" id="buck.jars">
<include name="args4j/args4j-2.0.30.jar" />
Expand Down Expand Up @@ -1056,6 +1059,10 @@
<arg value="programs/gen_buck_info.py"/>
<arg value="--java-version"/>
<arg value="${java.version}"/>
<arg value="--release-version"/>
<arg value="${release.version}"/>
<arg value="--release-timestamp"/>
<arg value="${release.timestamp}"/>
</exec>
</target>

Expand Down
13 changes: 10 additions & 3 deletions programs/gen_buck_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,16 @@

def main(argv):
parser = argparse.ArgumentParser()
parser.add_argument("--release-version", help="The buck release version")
parser.add_argument(
"--release-timestamp", help="The unix timestamp when the release happened"
"--release-version",
nargs = "?",
default = None,
help="The buck release version")
parser.add_argument(
"--release-timestamp",
nargs = "?",
default = None,
help="The unix timestamp when the release happened"
)
parser.add_argument(
"--java-version",
Expand All @@ -52,7 +59,7 @@ def main(argv):
candidate_paths = []
vcs_module = None
while vcs_module is None and os.path.dirname(path) != path:
while not os.path.exists(os.path.join(path, ".buckconfig")):
while not os.path.exists(os.path.join(path, ".buckconfig")) and os.path.dirname(path) != path:
path = os.path.dirname(path)
for vcs_dir, module in SUPPORTED_VCS.items():
if os.path.exists(os.path.join(path, vcs_dir)):
Expand Down

0 comments on commit 3cb1605

Please sign in to comment.