Skip to content

Commit c840fd5

Browse files
authored
Add special cases to release script (#483)
* Add special cases to release script * Remove BaseRouter * add yarn script to release npm package * Add IBaseRouter as special case, not BaseRouter * pkg bump * release 3.9.1-1 * Update release script to remove node_modules and abi inside /contracts dir * pkg bump * yarn release does not work; npm auth fails
1 parent 0faa76a commit c840fd5

File tree

4 files changed

+8
-119
lines changed

4 files changed

+8
-119
lines changed

contracts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@thirdweb-dev/contracts",
33
"description": "Collection of smart contracts deployable via the thirdweb SDK, dashboard and CLI",
4-
"version": "3.9.0",
4+
"version": "3.9.1",
55
"license": "Apache-2.0",
66
"repository": {
77
"type": "git",

contracts/prebuilts/account/utils/BaseRouter.sol

Lines changed: 0 additions & 117 deletions
This file was deleted.

release.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ np --any-branch --no-tests
4949
fi
5050
# delete copied README
5151
rm README.md
52+
# delete copied README
53+
rm -rf node_modules
54+
# delete copied README
55+
rm -rf abi
5256
# back to root folder
5357
cd -
5458
echo "### Done."

scripts/package-release.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const artifactsForgeDir = path.join(__dirname, "..", "artifacts_forge");
66
const contractsDir = path.join(__dirname, "..", "contracts");
77
const contractArtifactsDir = path.join(__dirname, "..", "contract_artifacts");
88

9+
const specialCases: string[] = ["IBaseRouter.sol"];
10+
911
async function getAllSolidityFiles(dir: string): Promise<string[]> {
1012
const dirents = await fs.readdir(dir, { withFileTypes: true });
1113
const files = await Promise.all(
@@ -37,7 +39,7 @@ async function main() {
3739
// Removing the .sol extension from the directory name to match with file names
3840
const artifactName = path.basename(artifactDir, ".sol");
3941

40-
if (validContractFiles.includes(artifactName + ".sol")) {
42+
if (validContractFiles.includes(artifactName + ".sol") || specialCases.includes(artifactName + ".sol")) {
4143
const sourcePath = path.join(artifactsForgeDir, artifactDir);
4244
const destinationPath = path.join(contractArtifactsDir, artifactDir);
4345
await fs.copy(sourcePath, destinationPath);

0 commit comments

Comments
 (0)