#!/usr/bin/env bash

# cd to the root of the repo
cd "$(git rev-parse --show-toplevel)"

# avoids re-compilation during publishing of both packages
if [[ ! -v ALREADY_COMPILED ]]; then
  npm run prepare
fi

cp README.md contracts/
mkdir contracts/build contracts/build/contracts
cp -r build/contracts/*.json contracts/build/contracts

#!/usr/bin/env bash

# cd to the root of the repo
cd "$(git rev-parse --show-toplevel)"

# avoids re-compilation during publishing of both packages
if [[ ! -v ALREADY_COMPILED ]]; then
  npm run prepublish
  npm run prepare
  npm run prepack
fi

cp README.md contracts/
mkdir contracts/build contracts/build/contracts
cp -r build/contracts/*.json contracts/build/contracts

Add scripts for when publishing @openzeppelin/contracts directly
Add scripts for when publishing @openzeppelin/contracts directly

(cherry picked from commit a1408a34110d6460b90624fc96fd2a6d01faa384)
