Evan You vor 9 Jahren
Ursprung
Commit
d5fdaeadca
2 geänderte Dateien mit 15 neuen und 14 gelöschten Zeilen
  1. 13 13
      build/release.sh
  2. 2 1
      package.json

+ 13 - 13
build/release.sh

@@ -6,21 +6,21 @@ read -p "Releasing $VERSION - are you sure? (y/n)" -n 1 -r
 echo    # (optional) move to a new line
 if [[ $REPLY =~ ^[Yy]$ ]]
 then
-    echo "Releasing $VERSION ..."
+  echo "Releasing $VERSION ..."
 
-    # run tests
-    npm test 2>/dev/null
+  # run tests
+  npm test 2>/dev/null
 
-    # build
-    VERSION=$VERSION npm run build
+  # build
+  VERSION=$VERSION npm run build
 
-    # # commit
-    git add -A
-    git commit -m "[build] $VERSION"
-    npm version $VERSION --message "[release] $VERSION"
+  # commit
+  git add -A
+  git commit -m "[build] $VERSION"
+  npm version $VERSION --message "[release] $VERSION"
 
-    # # publish
-    git push origin refs/tags/v$VERSION
-    git push
-    npm publish
+  # publish
+  git push origin refs/tags/v$VERSION
+  git push
+  npm publish
 fi

+ 2 - 1
package.json

@@ -20,7 +20,8 @@
     "e2e": "casperjs test --concise ./test/e2e",
     "test": "eslint src && npm run unit && npm run build-examples && npm run e2e",
     "docs": "cd docs && gitbook serve",
-    "deploy-docs": "cd docs && ./deploy.sh"
+    "deploy-docs": "cd docs && ./deploy.sh",
+    "release": "bash build/release.sh"
   },
   "repository": {
     "type": "git",