1.0.1 • Published 9 years ago
appx-manifest-version v1.0.1
appx-manifest-version
Tool used to increment the version number of an AppxManifest.xml file.
Installation
The package is published to npmjs.com. You can install with:
npm install -g appx-manifest-versionor
npm install appx-manifest-version --save-devCommand Line
appx-version manifest_file_pathThis will load the Appx manifest XML file manifest_file_path, locate
the Package/Identity@Version field and increment the final numerical
field after a period (.). Then it will overwrite the original manifest
file with the updated content.
Code
You can call into the appx-manifest-version module from your own code
as follows:
const appxVersion = require('appx-manifest-version');
// currentManifestString is a string containing the manifest contents
// returns a Promise
appxVersion.incrementVersion(currentManifestString)
.then(data => {
console.log(data.version); // new version string
console.log(data.manifest); // new manifest string
})
.catch(err => {
console.error(err.status); // error code
console.error(err.details); // error details string
});
// manifestPath is the path to the manifest XML file
// overwriteCurrent is true if the current XML file should be updated
// returns a Promise
appxVersion.incrementVersionFile(manifestPath,overwriteCurrent)
.then(data => {
console.log(data.version); // new version string
console.log(data.manifest); // new manifest string
})
.catch(err => {
console.error(err.status); // error code
console.error(err.details); // error details string
});License
See the LICENSE file.