diff --git a/package.json b/package.json index ea9a0c4..2466363 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "4.4.4", + "version": "4.5.0", "description": "Pixi.js is a fast lightweight 2D library that works across all devices.", "author": "Mat Groves", "contributors": [ @@ -44,7 +44,8 @@ "publish:minor": "npm version minor && npm publish", "publish:major": "npm version major && npm publish", "postversion": "npm run clean && npm run build && npm run lib && npm test", - "postpublish": "git push && git push --tags" + "postpublish": "git push && git push --tags && npm run release", + "release": "node scripts/release" }, "files": [ "dist/", @@ -73,6 +74,7 @@ "electron": "^1.4.15", "eslint": "^3.5.0", "floss": "^2.0.1", + "gh-pages": "^0.12.0", "jaguarjs-jsdoc": "^1.0.1", "js-md5": "^0.4.1", "jsdoc": "^3.4.2", diff --git a/package.json b/package.json index ea9a0c4..2466363 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "4.4.4", + "version": "4.5.0", "description": "Pixi.js is a fast lightweight 2D library that works across all devices.", "author": "Mat Groves", "contributors": [ @@ -44,7 +44,8 @@ "publish:minor": "npm version minor && npm publish", "publish:major": "npm version major && npm publish", "postversion": "npm run clean && npm run build && npm run lib && npm test", - "postpublish": "git push && git push --tags" + "postpublish": "git push && git push --tags && npm run release", + "release": "node scripts/release" }, "files": [ "dist/", @@ -73,6 +74,7 @@ "electron": "^1.4.15", "eslint": "^3.5.0", "floss": "^2.0.1", + "gh-pages": "^0.12.0", "jaguarjs-jsdoc": "^1.0.1", "js-md5": "^0.4.1", "jsdoc": "^3.4.2", diff --git a/scripts/release.js b/scripts/release.js new file mode 100644 index 0000000..c4c8e36 --- /dev/null +++ b/scripts/release.js @@ -0,0 +1,42 @@ +#!/usr/bin/env node +'use strict'; + +// Publish script to push releases of the bin files +// the normally are gitignored +const ghpages = require('gh-pages'); +const path = require('path'); +const packageInfo = require(path.join(__dirname, '..', 'package.json')); + +const options = { + src: [ + 'dist/**/*', + 'lib/**/*', + 'src/**/*', + 'scripts/**/*', + 'test/**/*', + '*.json', + '*.md', + 'LICENSE', + '.eslintrc', + '.editorconfig', + '.travis.yml', + '.babelrc', + ], + dotfiles: true, + branch: 'release', + message: packageInfo.version, + logger: console.log.bind(console), +}; + +ghpages.publish(process.cwd(), options, (err) => +{ + if (err) + { + console.log(err); + process.exit(1); + + return; + } + + process.exit(0); +});