-
Notifications
You must be signed in to change notification settings - Fork 574
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 #71 from HyperLink-Technology/compile
v1.0.0b2
- Loading branch information
Showing
7 changed files
with
57 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/python3 | ||
|
||
from docopt import docopt | ||
from pathlib import Path | ||
import shutil | ||
|
||
import brownie.project as project | ||
import brownie._config as config | ||
|
||
|
||
__doc__ = """Usage: brownie compile [options] | ||
Options: | ||
--all Recompile all contracts | ||
--help Display this message | ||
Compiles the contract source files for this project and saves the results | ||
in the build/contracts folder.""" | ||
|
||
|
||
def main(): | ||
args = docopt(__doc__) | ||
project_path = project.check_for_project('.') | ||
build_path = project_path.joinpath('build/contracts') | ||
if config.ARGV['all']: | ||
shutil.rmtree(build_path, ignore_errors=True) | ||
project.load(project_path) | ||
print("Brownie project has been compiled at {}".format(build_path)) |
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
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