Skip to content

Commit

Permalink
update g3 build rule
Browse files Browse the repository at this point in the history
  • Loading branch information
soralit committed Nov 13, 2023
1 parent a7e0235 commit 1adfa19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions v3/generate_abi_dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ def merge_abis_to_sqlite(chain_name, db_target_path, contracts_path):
targets = [ name for name in os.listdir('.') if os.path.isdir(os.path.join('.', name)) and name not in ignored]
if os.path.exists("./outputs"):
shutil.rmtree("./outputs", ignore_errors=True)
if not os.path.exists("./outputs/contracts/g3"):
os.makedirs("./outputs/contracts/g3")
db_target_path = "./outputs/contracts/g3"
if not os.path.exists("./outputs/contracts"):
os.makedirs("./outputs/contracts")
db_target_path = "./outputs/contracts"
for each_target in targets:
path = f"./{each_target}/"
merge_abis_to_sqlite(each_target, db_target_path, contracts_path=path)
[each.close() for each in connection_pool.values()]
shutil.make_archive('contracts_g3', 'zip', root_dir='./outputs', base_dir='contracts/g3')
shutil.make_archive('contracts_g3', 'zip', root_dir='./outputs', base_dir='contracts')

0 comments on commit 1adfa19

Please sign in to comment.