Enable partial transpilation for upgradeable package (#4628)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
(cherry picked from commit 58463a9823)
This commit is contained in:
Francisco
2023-09-28 18:31:49 -03:00
committed by Francisco Giordano
parent 4ce98d75bf
commit 322df4226d
20 changed files with 192 additions and 49 deletions

View File

@ -4,9 +4,20 @@ set -euo pipefail
shopt -s globstar
# cross platform `mkdir -p`
node -e 'fs.mkdirSync("build/contracts", { recursive: true })'
mkdirp() {
node -e "fs.mkdirSync('$1', { recursive: true })"
}
cp artifacts/contracts/**/*.json build/contracts
rm build/contracts/*.dbg.json
# cd to the root of the repo
cd "$(git rev-parse --show-toplevel)"
npm run clean
env COMPILE_MODE=production npm run compile
mkdirp contracts/build/contracts
cp artifacts/contracts/**/*.json contracts/build/contracts
rm contracts/build/contracts/*.dbg.json
node scripts/remove-ignored-artifacts.js
cp README.md contracts/