Skip to content

Commit

Permalink
fix: Rollback Manifest.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
antife-yinyue committed Sep 4, 2018
1 parent 76fd72e commit 6a46330
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apfe-cli",
"version": "1.4.2",
"version": "1.4.3",
"description": "Alipay+ Subapp ToolKit",
"keywords": [
"ToolKit",
Expand Down
31 changes: 16 additions & 15 deletions src/bin/apfe-pack-pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function archiving (subapp, cb) {

const src = gulp.src(distSrc).on('end', () => {
// build Manifest.xml
// buildManifestSync(subapp, TEMP_PATH, true)
buildManifestSync(subapp, TEMP_PATH, true)

setTimeout(() => {
gulp.start('cert')
Expand Down Expand Up @@ -195,20 +195,21 @@ function packSubapp (config) {
* @param {Object} subapp package.json config
* @param {String} manifestDir output path
*/
// function buildManifestSync (subapp, manifestDir) {
// try {
// const out = []
// out.push('<?xml version="1.0" encoding="utf-8"?>')
// out.push('<package>')
// out.push(' <name>' + subapp.id + '</name>')
// out.push(' <version>' + subapp.version + '</version>')
// out.push('</package>')
// const outStr = out.join('\n')
// fs.outputFileSync(manifestDir + '/Manifest.xml', outStr)
// } catch (e) {
// console.error(chalk.red('# write Manifest.xml error:'))
// }
// }
function buildManifestSync (subapp, manifestDir) {
try {
const out = []
out.push('<?xml version="1.0" encoding="utf-8"?>')
out.push('<package>')
out.push(' <uid>' + subapp.id + '</uid>')
out.push(' <name>' + subapp.id + '</name>')
out.push(' <version>' + subapp.version + '</version>')
out.push('</package>')
const outStr = out.join('\n')
fs.outputFileSync(manifestDir + '/Manifest.xml', outStr)
} catch (e) {
console.error(chalk.red('# write Manifest.xml error:'))
}
}

/**
* signTar
Expand Down

0 comments on commit 6a46330

Please sign in to comment.