Skip to content

Commit

Permalink
chore: fixed compilation during contracts publication
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybuidl committed Jul 29, 2024
1 parent f8a995b commit db762de
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 6 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kleros/kleros-v2-contracts",
"version": "0.4.0",
"version": "0.4.1",
"description": "Smart contracts for Kleros version 2",
"main": "typechain-types/index.ts",
"repository": "[email protected]:kleros/kleros-v2.git",
Expand Down Expand Up @@ -53,7 +53,11 @@
"release:patch": "scripts/publish.sh patch",
"release:minor": "scripts/publish.sh minor",
"release:major": "scripts/publish.sh major",
"tenderly-verify": "hardhat tenderly:verify"
"tenderly-verify": "hardhat tenderly:verify",
"build:all": "yarn rimraf ./dist && yarn build:cjs && yarn build:esm && yarn build:types",
"build:cjs": "tsc --project tsconfig.json --module commonjs --outDir ./dist/cjs && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json",
"build:esm": "tsc --project tsconfig.json --module es2020 --outDir ./dist/esm && echo '{\"type\": \"module\"}' > ./dist/esm/package.json",
"build:types": "tsc --project tsconfig.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap"
},
"devDependencies": {
"@defi-wonderland/natspec-smells": "^1.0.3",
Expand Down
7 changes: 6 additions & 1 deletion contracts/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ yarn export:testnet
yarn export:mainnet

mkdir dist
cp -pr README.md deployments src/ dist/
yarn tsc --project tsconfig.json --module commonjs --outDir ./dist
cp -pr README.md src/ dist/
rm -rf dist/config
rm -rf dist/deploy
rm -rf dist/scripts
rm -rf dist/test
rm -rf dist/hardhat.config*
rm -rf dist/deployments/**/solcInputs
rm -rf dist/deployments/localhost
rm -rf dist/deployments/hardhat
Expand Down
6 changes: 5 additions & 1 deletion contracts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"./scripts",
"./test",
"./typechain-types",
"./deploy"
"./deploy",
"./deployments"
],
"exclude": [
"./scripts/**/console*.ts"
],
"files": [
"./hardhat.config.ts"
Expand Down

0 comments on commit db762de

Please sign in to comment.