Browse Source

去掉zip压缩

yingp 8 years ago
parent
commit
1b247c022e
3 changed files with 4 additions and 20 deletions
  1. 0 14
      build/zip.js
  2. 1 3
      package.json
  3. 3 3
      post.sh

+ 0 - 14
build/zip.js

@@ -1,14 +0,0 @@
-var fs = require('fs')
-var path = require('path')
-var archiver = require('archiver')
-
-var output = fs.createWriteStream(path.join(__dirname, '../dist.zip'))
-var archive = archiver('zip')
-
-archive.on('error', function (err) {
-  throw err
-})
-
-archive.pipe(output)
-archive.directory(path.join(__dirname, '../'), '')
-archive.finalize()

+ 1 - 3
package.json

@@ -5,7 +5,6 @@
   "author": "yingp <yingp@usoftchina.com>",
   "private": true,
   "dependencies": {
-    "archiver": "^2.1.0",
     "axios": "^0.15.3",
     "bezier-easing": "^2.0.3",
     "bootstrap": "^3.3.7",
@@ -30,8 +29,7 @@
     "start": "cross-env NODE_ENV=production node server.js",
     "generate": "cross-env NODE_ENV=production nuxt generate",
     "lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
-    "precommit": "npm run lint",
-    "zip": "node build/zip.js"
+    "precommit": "npm run lint"
   },
   "devDependencies": {
     "babel-cli": "^6.24.1",

+ 3 - 3
post.sh

@@ -2,15 +2,15 @@
 
 groupId=com.uas.platform
 artifactId=mall-ssr
-packaging=zip
+packaging=tgz
 version=1.0.0
 repo_uri='http://10.10.100.23:23004/v1/artifact'
 
 basepath=$(cd `dirname $0`; pwd)
-buildfile=$basepath/dist.zip
+buildfile=$basepath/dist.tgz
 
 cnpm install
 npm run build
-npm run zip
+tar -czf $buildfile .
 curl -H "Expect:" -F "groupId=$groupId" -F "artifactId=$artifactId" -F "packaging=$packaging"  -F "version=$version" -F "file=@$buildfile" $repo_uri
 rm -rf $buildfile