Skip to content

Commit

Permalink
Merge pull request #147 from VenusProtocol/fix/exclude-deployments-fr…
Browse files Browse the repository at this point in the history
…om-exports

[VEN-2242]: exclude external deployments when exporting
  • Loading branch information
coreyar authored Dec 12, 2023
2 parents 2df8fcf + 0286860 commit 053874c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Export deployments
run: |
for NETWORK in bsctestnet bscmainnet ethereum sepolia; do
yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
EXPORT=true yarn hardhat export --network ${NETWORK} --export ./deployments/${NETWORK}.json
jq -M '{name, chainId, addresses: .contracts | map_values(.address)}' ./deployments/${NETWORK}.json > ./deployments/${NETWORK}_addresses.json
done
yarn prettier
Expand Down
15 changes: 14 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,25 @@ import "@typechain/hardhat";
import * as dotenv from "dotenv";
import "hardhat-deploy";
import "hardhat-gas-reporter";
import { HardhatUserConfig } from "hardhat/config";
import { HardhatUserConfig, extendConfig } from "hardhat/config";
import { HardhatConfig } from "hardhat/types";
import "solidity-coverage";
import "solidity-docgen";

dotenv.config();

extendConfig((config: HardhatConfig) => {
if (process.env.EXPORT !== "true") {
// eslint-disable-next-line no-param-reassign
config.external = {
...config.external,
deployments: {
// Define external deployments here
},
};
}
});

function isFork() {
return process.env.FORK === "true"
? {
Expand Down

0 comments on commit 053874c

Please sign in to comment.