wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.2k stars 296 forks source link

--reset resets all deployments even when --tags are used #300

Open radeksvarz opened 2 years ago

radeksvarz commented 2 years ago

Having a sequence of deploy scripts I wanted to redeploy only using 1 of them (redeploying 1 contract).

I expected the --reset would delete only those deployments, which are related to the given --tags.

However it deleted all deployments.

I understand this might be the design decision. Is there any work around in such case?

wighawag commented 2 years ago

tags are not known post deployment actually tags are not necessarily tied to deployments, so --reset has to delete all

I guess you could have a script that delete contract you know are using which tags

radeksvarz commented 2 years ago

I found the workaround:

Regarding --reset I suggest to update help to make it clear: whether to delete all deployments files first

jmendiola222 commented 6 months ago

Agree, I expected the same (only related Tags deployments to be reset). Even if the workaround does works, seems hacky, I would suggest renaming --reset to reset-all and/or add parameters to it, like: --reset * for all and --reset NAME_1,NAME_2 for specific components.

wighawag commented 6 months ago

Agree, I expected the same (only related Tags deployments to be reset). Even if the workaround does works, seems hacky, I would suggest renaming --reset to reset-all and/or add parameters to it, like: --reset * for all and --reset NAME_1,NAME_2 for specific components.

--reset NAME cannot work as mentioned in my comment above

It would be good to have confirmation stating what happens though