1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-09 01:46:40 +02:00

remove deployment to gh-pages, correct website url

This commit is contained in:
koalyptus 2018-05-06 11:24:38 +10:00
parent c0520dd4bb
commit 6bc6c8a8eb
7 changed files with 10 additions and 130 deletions

View file

@ -7,12 +7,11 @@ before_script:
script: script:
- npm test - npm test
- npm run codecov - npm run codecov
- npm run deploy - npm run build:all
branches: branches:
only: only:
- master - master
- /^greenkeeper/.*$/ - /^greenkeeper/.*$/
- gh-pages
before_deploy: before_deploy:
- git config --global user.email "maxgug@hotmail.com" - git config --global user.email "maxgug@hotmail.com"
- git config --global user.name "koalyptus" - git config --global user.name "koalyptus"

View file

@ -4,7 +4,6 @@ module.exports = function (grunt) {
var testDir = 'test'; var testDir = 'test';
var testHost = 'http://localhost:8000/'; var testHost = 'http://localhost:8000/';
var pkg = grunt.file.readJSON('package.json'); var pkg = grunt.file.readJSON('package.json');
var repo = 'github.com/koalyptus/TableFilter';
grunt.initConfig({ grunt.initConfig({
@ -145,78 +144,7 @@ module.exports = function (grunt) {
'build-css': { 'build-css': {
command: 'npm run build:css' command: 'npm run build:css'
} }
},
'gh-pages': {
options: {
branch: 'gh-pages',
add: true
},
'publish-lib': {
options: {
base: 'dist',
repo: 'https://' + repo,
message: 'publish TableFilter lib to gh-pages (cli)'
},
src: ['**/*']
},
'publish-readme': {
options: {
base: './',
repo: 'https://' + repo,
message: 'publish README and LICENSE to gh-pages (cli)'
},
src: ['README.md', 'LICENSE']
},
'publish-docs': {
options: {
base: 'docs',
repo: 'https://' + repo,
message: 'publish Docs to gh-pages (cli)'
},
src: ['**/*']
},
'deploy-lib': {
options: {
user: {
name: 'koalyptus'
},
base: 'dist',
repo: 'https://' + process.env.GH_TOKEN + '@' + repo,
message: 'publish TableFilter to gh-pages (auto)' +
getDeployMessage(),
silent: true
},
src: ['**/*']
},
'deploy-readme': {
options: {
user: {
name: 'koalyptus'
},
base: './',
repo: 'https://' + process.env.GH_TOKEN + '@' + repo,
message: 'publish README to gh-pages (auto)' +
getDeployMessage(),
silent: true
},
src: ['README.md', 'LICENSE']
},
'deploy-docs': {
options: {
user: {
name: 'koalyptus'
},
base: 'docs',
repo: 'https://' + process.env.GH_TOKEN + '@' + repo,
message: 'publish Docs to gh-pages (auto)' +
getDeployMessage(),
silent: true
},
src: ['**/*']
}
} }
}); });
grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-copy');
@ -226,7 +154,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-shell'); grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-qunit-istanbul'); grunt.loadNpmTasks('grunt-qunit-istanbul');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.registerTask('eslint', ['shell:eslint']); grunt.registerTask('eslint', ['shell:eslint']);
grunt.registerTask('esdoc', ['shell:esdoc']); grunt.registerTask('esdoc', ['shell:esdoc']);
@ -253,15 +180,9 @@ module.exports = function (grunt) {
// Tests with coverage // Tests with coverage
grunt.registerTask('test', ['build-test', 'connect', 'qunit:all']); grunt.registerTask('test', ['build-test', 'connect', 'qunit:all']);
// Publish to gh-pages // Build all for deployment from travis
grunt.registerTask('publish', 'Publish from CLI', [ grunt.registerTask('build-all', 'Prepare for deployment', [
'build', 'build-demos', 'esdoc', 'gh-pages:publish-lib', 'build', 'build-demos', 'esdoc'
'gh-pages:publish-readme', 'gh-pages:publish-docs'
]);
// Deploy to gh-pages
grunt.registerTask('deploy', 'Publish from Travis', [
'build', 'esdoc', 'check-deploy'
]); ]);
// Custom task running QUnit tests for specified files. // Custom task running QUnit tests for specified files.
@ -328,43 +249,4 @@ module.exports = function (grunt) {
return getFiles(testDir, host); return getFiles(testDir, host);
} }
grunt.registerTask('check-deploy', function () {
var env = process.env;
// need this
this.requires(['build', 'esdoc']);
// only deploy under these conditions
if (env.TRAVIS === 'true' &&
env.TRAVIS_SECURE_ENV_VARS === 'true' &&
env.TRAVIS_PULL_REQUEST === 'false') {
grunt.log.writeln('executing deployment');
// queue deploy
grunt.task.run([
'gh-pages:deploy-lib',
'gh-pages:deploy-readme',
'gh-pages:deploy-docs'
]);
} else {
grunt.log.writeln('skipped deployment');
}
});
// Get a formatted commit message to review changes from the commit log
// github will turn some of these into clickable links
function getDeployMessage() {
var ret = '\n\n';
var env = process.env;
if (env.TRAVIS !== 'true') {
ret += 'missing env vars for travis-ci';
return ret;
}
ret += 'branch: ' + env.TRAVIS_BRANCH + '\n';
ret += 'SHA: ' + env.TRAVIS_COMMIT + '\n';
ret += 'range SHA: ' + env.TRAVIS_COMMIT_RANGE + '\n';
ret += 'build id: ' + env.TRAVIS_BUILD_ID + '\n';
ret += 'build number: ' + env.TRAVIS_BUILD_NUMBER + '\n';
return ret;
}
}; };

4
dist/starter.html vendored
View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>tablefilter v0.6.33 - Starter</title> <title>tablefilter v0.6.35 - Starter</title>
</head> </head>
<body> <body>
<h1>tablefilter v0.6.33</h1> <h1>tablefilter v0.6.35</h1>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -33,7 +33,7 @@
"codecov": "./node_modules/.bin/codecov", "codecov": "./node_modules/.bin/codecov",
"esdoc": "esdoc", "esdoc": "esdoc",
"dist": "grunt", "dist": "grunt",
"deploy": "grunt deploy", "build:all": "grunt build-all",
"start": "npm run server" "start": "npm run server"
}, },
"publishConfig": { "publishConfig": {
@ -58,7 +58,6 @@
"grunt-contrib-connect": "^1.0.2", "grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0", "grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "^1.0.0", "grunt-contrib-watch": "^1.0.0",
"grunt-gh-pages": "^2.0.0",
"grunt-qunit-istanbul": "1.0.0", "grunt-qunit-istanbul": "1.0.0",
"grunt-shell": "2.1.0", "grunt-shell": "2.1.0",
"grunt-string-replace": "^1.3.1", "grunt-string-replace": "^1.3.1",

View file

@ -9,7 +9,7 @@ import {RIGHT} from './toolbar';
const WIKI_URL = 'https://github.com/koalyptus/TableFilter/wiki/' + const WIKI_URL = 'https://github.com/koalyptus/TableFilter/wiki/' +
'4.-Filter-operators'; '4.-Filter-operators';
const WEBSITE_URL = 'http://koalyptus.github.io/TableFilter/'; const WEBSITE_URL = 'https://www.tablefilter.com/';
/** /**
* Help UI component * Help UI component