Open pdehaan opened 6 years ago
Actually, now that we're a web-ext, values may be in 3 places, although I'm not clear if they need to be in sync:
Yes, let's automate setting the version number in those three places in some sort of build step.
I don't know how you set package.json versions currently, but if you're using npm version
, we could probably just write some postversion
npm script which will automatically update the version in /webext/manifest.json, and /experiment/install.rdf with the value from /package.json.
I guess even if you aren't bumping the major|minor|patch versions using the npm version
CLI, you could manually run npm run postversion
after you've hand crafted the package.json version number to update it in the other places.
We've used it on different projects for keeping package.json and the install.rdf in sync, and it worked fairly well.
I think we'd just need a ./install.rdf.mustache template with something like this:
And then build the ./addon/install.rdf using something like this in package.json: