From 5ff7932bb881752751247225b7c2cb0b8d83e749 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jun 2020 16:09:46 +0200 Subject: [PATCH] Removed gulp `premerge` task (#2357) --- .travis.yml | 9 ++++++--- gulpfile.js/index.js | 2 -- gulpfile.js/premerge.js | 20 -------------------- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 gulpfile.js/premerge.js diff --git a/.travis.yml b/.travis.yml index 4cbb749561..1023859023 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 ae3e0d06e4..ece403a2e3 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 c83894b102..0000000000 --- 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 -};