From 3788a9161ac9bdab9c48906f61811ffc9a9c8c81 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 31 Mar 2017 09:56:08 +0000 Subject: [PATCH] Updated .travis.yml to add GA code to GH Pages --- .travis.yml | 2 ++ Gruntfile.js | 16 +--------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3e11eeaa..80a892aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,8 @@ script: - grunt docs - grunt node - grunt prod +before_deploy: + - grunt copy:ghPages deploy: - provider: pages skip_cleanup: true diff --git a/Gruntfile.js b/Gruntfile.js index 3d77ab02..82b4ca3f 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -28,10 +28,6 @@ module.exports = function (grunt) { "Creates a production-ready build. Use the --msg flag to add a compile message.", ["eslint", "clean:prod", "webpack:webProd", "inline", "chmod"]); - grunt.registerTask("release", - "Prepares and deploys a production version of CyberChef to the gh-pages branch.", - ["copy:ghPages", "exec:deployGhPages"]); - grunt.registerTask("default", "Lints the code base", ["eslint", "exec:repoSize"]); @@ -295,7 +291,7 @@ module.exports = function (grunt) { process: function (content, srcpath) { // Add Google Analytics code to index.html content = content.replace("", - grunt.file.read("src/static/ga.html") + ""); + grunt.file.read("src/web/static/ga.html") + ""); return grunt.template.process(content); } }, @@ -328,16 +324,6 @@ module.exports = function (grunt) { cleanGit: { command: "git gc --prune=now --aggressive" }, - deployGhPages: { - command: [ - "git add build/prod/index.html -v", - "COMMIT_HASH=$(git rev-parse HEAD)", - "git commit -m \"GitHub Pages release for ${COMMIT_HASH}\"", - "git push origin `git subtree split --prefix build/prod master`:gh-pages --force", - "git reset HEAD~", - "git checkout build/prod/index.html" - ].join(";") - } }, execute: { test: "build/test/index.js"