Commit 5ff7932bb881752751247225b7c2cb0b8d83e749

Michael Schmidt 2020-06-12T16:09:46

Removed gulp `premerge` task (#2357)

diff --git a/.travis.yml b/.travis.yml
index 4cbb749..1023859 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,9 +13,12 @@ before_install:
 install:
 - npm ci
 before_script:
-- npm install -g gulp
-- gulp
-- gulp premerge
+# Rebuild Prism
+- npx gulp
+# Detect changes
+# First, we stage all changes and then detect if there is anything staged
+- git add --all && git diff-index --cached HEAD --stat --exit-code ||
+  (echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1)
 script: npm test
 deploy:
   provider: npm
diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js
index ae3e0d0..ece403a 100644
--- a/gulpfile.js/index.js
+++ b/gulpfile.js/index.js
@@ -12,7 +12,6 @@ const util = require('util');
 const fs = require('fs');
 
 const paths = require('./paths');
-const { premerge } = require('./premerge');
 const { changes, linkify } = require('./changelog');
 
 
@@ -216,7 +215,6 @@ const plugins = series(languagePlugins, minifyPlugins);
 module.exports = {
 	watch: watchComponentsAndPlugins,
 	default: parallel(components, plugins, componentsJsonToJs, build),
-	premerge,
 	linkify,
 	changes
 };
diff --git a/gulpfile.js/premerge.js b/gulpfile.js/premerge.js
deleted file mode 100644
index c83894b..0000000
--- a/gulpfile.js/premerge.js
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-const git = require('simple-git/promise')(__dirname);
-
-
-/**
- * Checks that no files have been modified by the build process.
- */
-function gitChanges() {
-	return git.status().then(res => {
-		if (res.files.length > 0) {
-			console.log(res);
-			throw new Error('There are changes in the file system. Did you forget to run gulp?');
-		}
-	});
-}
-
-module.exports = {
-	premerge: gitChanges
-};