From 4278525fdd8eaa8c32f3ad9366078f04305e9b74 Mon Sep 17 00:00:00 2001 From: camalot Date: Wed, 11 May 2016 22:14:08 -0500 Subject: [PATCH 01/31] added styles for 'aborted' jobs --- parts/_code-editor.less | 15 ++++++--------- parts/_dashboard.less | 2 ++ parts/_icons.less | 11 ++++++++++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/parts/_code-editor.less b/parts/_code-editor.less index 7039c9f..0a5a4d8 100644 --- a/parts/_code-editor.less +++ b/parts/_code-editor.less @@ -93,7 +93,7 @@ z-index: 10; position: absolute; visibility: hidden; - border-left: 6px solid @green; + border-left: 6px solid @green !important; border-right: none; width: 0; } @@ -113,23 +113,20 @@ width: auto; border: 0; background: transparent; - background: rgba(255, 255, 255, .4); -} -/* Kludge to turn off filter in ie9+, which also accepts rgba */ -.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) { - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + background: rgba(0, 255, 0, .4) !important; } + .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {} .CodeMirror-focused pre.CodeMirror-cursor { visibility: visible; } div.CodeMirror-selected { - background: lighten(@blue,50%); + background: lighten(@blue,50%) !important; color: @white !important; } .CodeMirror-focused div.CodeMirror-selected { - background: lighten(@blue,50%); - color: @white; + background: lighten(@blue,50%) !important; + color: @white !important; } .CodeMirror-searching { background: #ffa; diff --git a/parts/_dashboard.less b/parts/_dashboard.less index 963fd51..91f701a 100644 --- a/parts/_dashboard.less +++ b/parts/_dashboard.less @@ -12,10 +12,12 @@ table#computers { .job-status-green-anime, .job-status-blue-anime, .job-status-nobuilt-anime, + .job-status-aborted-anime, .job-status-red, .job-status-yellow, .job-status-green, .job-status-blue, + .job-status-aborted, .job-status-nobuilt, .job-status- { td { diff --git a/parts/_icons.less b/parts/_icons.less index eb5ad84..51d466d 100644 --- a/parts/_icons.less +++ b/parts/_icons.less @@ -4,6 +4,10 @@ img.icon-hourglass { content: @clock-image-16; } +img[src$="artifactory-icon.png"][height="16px"] { + margin-right: 4px; +} + .icon-stop { content: @stop-build-image-16; } @@ -151,6 +155,7 @@ img[src$="/images/atom.gif"] { .icon-yellow, .icon-nobuilt-anime, .icon-nobuilt, +.icon-aborted, .icon-grey-anime, .icon-grey, .icon-blue-anime, @@ -362,6 +367,7 @@ img[src$="red.png"] { /* swap out the animation images for new ones */ img { &.icon-grey-anime, + &.icon-aborted-anime, &.icon-nobuilt-anime { .spinning-build-image(); &.icon-xlg { @@ -378,7 +384,8 @@ img { } } } -img[src$="nobuilt_anime.gif"] +img[src$="aborted_anime.gif"], +img[src$="nobuilt_anime.gif"], img[src$="grey_anime.gif"] { vertical-align: text-top; .spinning-build-image(); @@ -397,6 +404,7 @@ img[src$="grey_anime.gif"] { } img { &.icon-grey, + &.icon-aborted, &.icon-nobuilt { &.icon-xlg { content: @grey-image-48; @@ -412,6 +420,7 @@ img { } } } +img[src$="aborted.png"], img[src$="nobuilt.png"], img[src$="grey.png"] { vertical-align: text-top; From 94a308c4f963e678f9e0c098d7bccf92e2174dc1 Mon Sep 17 00:00:00 2001 From: camalot Date: Tue, 17 May 2016 22:22:44 -0500 Subject: [PATCH 02/31] added pulse for aborted jobs --- parts/_dashboard.less | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/parts/_dashboard.less b/parts/_dashboard.less index 91f701a..1859402 100644 --- a/parts/_dashboard.less +++ b/parts/_dashboard.less @@ -31,7 +31,8 @@ table#computers { &.job-status-yellow-anime, &.job-status-green-anime, &.job-status-blue-anime, - &.job-status-nobuilt-anime { + &.job-status-nobuilt-anime, + &.job-status-aborted-anime, { animation: pulse 5s infinite; } } @@ -42,7 +43,8 @@ table#computers { &.job-status-yellow-anime, &.job-status-green-anime, &.job-status-blue-anime, - &.job-status-nobuilt-anime { + &.job-status-nobuilt-anime, + &.job-status-aborted-anime, { animation: pulse-alt 5s infinite; } } From 46760a0320789dff14ad19ad689fa513076826f0 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 15:05:03 -0500 Subject: [PATCH 03/31] added hpi, and refactored how it builds a bit to account for that. probably will be broken --- .gitignore | 10 ++ Vagrantfile | 15 ++ appveyor.yml | 32 ++++- gruntfile.js | 133 ++++++++++++++++++ jenkins-dark.less | 4 +- package.json | 42 ++++++ .../jenkins/JenkinsDarkThemeDecorator.java | 7 + plugin/src/main/pom.xml | 40 ++++++ .../JenkinsDarkThemeDecorator/header.jelly | 4 + plugin/src/main/resources/index.jelly | 7 + 10 files changed, 288 insertions(+), 6 deletions(-) create mode 100644 .gitignore create mode 100644 Vagrantfile create mode 100644 gruntfile.js create mode 100644 package.json create mode 100644 plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java create mode 100644 plugin/src/main/pom.xml create mode 100644 plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly create mode 100644 plugin/src/main/resources/index.jelly diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..914c6fb --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.DS_Store +.idea/ +node_modules/ +.vagrant/ +dist/ +hpi/ +target/ +work/ +*.iml +webapp/ diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..ec1f792 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,15 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "centos" + config.vm.network :forwarded_port, guest: 8080, host: 8880 + # Provisioning + provision_cmd = "wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo; " \ + "rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key; " \ + "yum install jenkins java-1.6.0-openjdk -y; " + config.vm.provision :shell, :inline => provision_cmd +end diff --git a/appveyor.yml b/appveyor.yml index 32fc52f..111893a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,23 +7,47 @@ install: - ps: Install-Product node $env:nodejs_version x64 - cmd: npm install -g less - cmd: npm install -g less-plugin-clean-css +- cmd: npm install -g grunt +- ps: | + $mvnVersion = '3.2.5' + Add-Type -AssemblyName System.IO.Compression.FileSystem + if (!(Test-Path -Path "C:\maven\")) { + (new-object System.Net.WebClient).DownloadFile( + "http://www.us.apache.org/dist/maven/maven-3/${mvnVersion}/binaries/apache-maven-${mvnVersion}-bin.zip", + 'c:\maven-bin.zip' + ) + [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven") + } +- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH% +- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g +- cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g build_script: -- cmd: lessc --lint jenkins-dark.less -- cmd: lessc jenkins-dark.less ./dist/jenkins-dark.css -- cmd: lessc --clean-css jenkins-dark.less ./dist/jenkins-dark.min.css +- cmd: grunt +- cmd: mkdir -p .\plugin\src\main\webapp +- cmd: xcopy .\dist\* .\plugin\src\main\webapp\ /h /i /c /k /y - ps: Compress-Archive -Path ${env:APPVEYOR_BUILD_FOLDER}/dist/*.css -DestinationPath ./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip +- ps: Remove-Item -Path '.\plugin\target' | Out-Null +- cmd: | + cd plugin + mvn package +- cmd: xcopy plugin\target\*.hpi .\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi /h /c /k /y artifacts: - path: dist/jenkins-dark.css name: css - path: dist/*.zip name: zip +- path: dist/*.hpi + name: hpi +cache: + - c:\maven\ + - c:\Users\appveyor\.m2\ deploy: - provider: GitHub tag: $(APPVEYOR_PROJECT_NAME)-$(APPVEYOR_BUILD_VERSION) release: $(APPVEYOR_PROJECT_NAME)-$(APPVEYOR_BUILD_VERSION) auth_token: secure: Es5XTlIJiCiCFJHGDOA09AGFVZQL0jIWtUuPp4+m7MBcfeoVGbWQP2jYU3oSL5bw - artifact: zip + artifact: zip, hpi draft: false force_update: true on: diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..6856fc3 --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,133 @@ +module.exports = function (grunt) { + require('load-grunt-tasks')(grunt); + + var pkg = grunt.file.readJSON('package.json'); + + grunt.initConfig({ + + + clean: { + dist: { + src: ["dist/*"] + } + }, + + less: { + dist: { + files: { + "dist/jenkins-dark.css": "less/jenkins-dark.less" + } + } + }, + + // imageEmbed: { + // light: { + // src: ["dist/jenkins-dark.css"], + // dest: "dist/jenkins-dark.css", + // options: { + // deleteAfterEncoding: false + // } + // } + // }, + + cssmin: { + minify: { + files: { + 'dist/jenkins-dark.css': ['dist/jenkins-dark.min.css'] + } + } + }, + imagemin: { + dynamic: { + options: { + svgoPlugins: [{ + removeViewBox: true, + removeDoctype: true, + removeXMLProcInst: true, + removeComments: true, + removeMetadata: true, + removeTitle: true, + removeDesc: true, + removeUselessDefs: true, + removeEditorsNSData: true, + removeEmptyAttrs: true, + removeHiddenElems: true, + removeEmptyText: true, + removeEmptyContainers: true, + removeViewBox: true, + cleanUpEnableBackground: true, + minifyStyles: true, + convertStyleToAttrs: true, + convertColors: true, + convertPathData: true, + convertTransform: true, + removeUnknownsAndDefaults: true, + removeNonInheritableGroupAttrs: true, + removeUselessStrokeAndFill: true, + removeUnusedNS: true, + cleanupIDs: true, + cleanupNumericValues: true, + moveElemsAttrsToGroup: true, + moveGroupAttrsToElems: true, + collapseGroups: true, + removeRasterImages: true, + mergePaths: true, + convertShapeToPath: true, + sortAttrs: true, + transformsWithOnePath: true, + removeDimensions: true, + removeAttrs: true, + addClassesToSVGElement: true, + removeStyleElement: true + }] + }, + files: [{ + expand: true, + cwd: 'node_modules/jenkins-core-theme/images/', + src: ['**/*.svg'], + dest: 'node_modules/jenkins-core-theme/images/' + }] + } + + }, + + replace: { + dist: { + options: { + patterns: [ + { + match: 'version', + replacement: pkg.version + }, + { + match: /jenkins-dark-theme<\/artifactId>\s+[^>]*<\/version>/g, + replacement: 'jenkins-dark-theme\n ' + pkg.version + '' + } + ] + }, + files: [ + {src: ['dist/jenkins-dark.css'], dest: 'dist/jenkins-dark.css'}, + {src: ['plugin/pom.xml'], dest: 'plugin/pom.xml'} + ] + } + }, + postcss: { + options: { + map: false, + processors: [ + require('autoprefixer')({browsers: 'last 2 versions'}), // add vendor prefixes + require('postcss-encode-base64-inlined-images'), + require('cssnano')() // minify the result + ] + }, + dist: { + src: 'dist/jenkins-dark*.css' + } + } + }); + + // Default task(s). + grunt.registerTask('default', ['clean', 'imagemin', 'less', 'replace', 'cssmin', 'postcss']); + + +}; diff --git a/jenkins-dark.less b/jenkins-dark.less index efc4d97..da9cab2 100644 --- a/jenkins-dark.less +++ b/jenkins-dark.less @@ -1,5 +1,5 @@ @import url( './parts/_variables.less'); -@-moz-document domain("my-jenkins-ci-host.com") { +//@-moz-document domain("my-jenkins-ci-host.com") { @import url( './parts/_keyframes.less'); ::-webkit-scrollbar { max-width: 10px !important; @@ -206,4 +206,4 @@ .timeline-container .timeline-event-icon > img { -webkit-filter: invert(80%); } -} +//} diff --git a/package.json b/package.json new file mode 100644 index 0000000..5af72bc --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "jenkins-dark-theme", + "version": "0.1.0", + "description": "A dark theme for Jenkins", + "repository": { + "type": "git", + "url": "https://github.com/camalot/jenkins-dark-stylish" + }, + "keywords": [ + "stylish", + "theme" + "jenkins" + ], + "author": "Ryan Conrad", + "contributors": [], + "license": "Apache 2.0", + "devDependencies": { + "autoprefixer": "^6.3.3", + "cssnano": "^3.5.2", + "grunt": "^0.4.5", + "grunt-autoprefixer": "^3.0.3", + "grunt-contrib-clean": "^0.5.0", + "grunt-contrib-copy": "^0.4.1", + "grunt-contrib-cssmin": "^0.6.2", + "grunt-contrib-imagemin": "^1.0.0", + "grunt-contrib-jshint": "^0.6.5", + "grunt-contrib-less": "^1.1.0", + "grunt-contrib-uglify": "^0.2.7", + "grunt-image-embed": "^0.3.3", + "grunt-postcss": "^0.7.2", + "grunt-replace": "^0.11.0", + "grunt-rev": "^0.1.0", + "imagemin-svgo": "^4.2.0", + "install": "^0.3.0", + "jenkins-core-theme": "^1.1.40", + "load-grunt-tasks": "^3.3.0", + "npm": "^3.4.1", + "pixrem": "^3.0.0", + "postcss-encode-base64-inlined-images": "0.0.1" + }, + "dependencies": {} +} diff --git a/plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java b/plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java new file mode 100644 index 0000000..e3b3f9f --- /dev/null +++ b/plugin/src/main/java/com/bit13/jenkins/JenkinsDarkThemeDecorator.java @@ -0,0 +1,7 @@ +package com.bit13.jenkins; +import hudson.Extension; +import hudson.model.PageDecorator; + +@Extension +public class JenkinsDarkThemeDecorator extends PageDecorator { +} diff --git a/plugin/src/main/pom.xml b/plugin/src/main/pom.xml new file mode 100644 index 0000000..c6d4e05 --- /dev/null +++ b/plugin/src/main/pom.xml @@ -0,0 +1,40 @@ + + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 1.642.2 + + + com.bit13.jenkins-dark + jenkins-dark-theme + 0.1.0 + hpi + + Dark Theme Plugin + https://github.com/camalot/jenkins-dark-stylish + + + + camalot + Ryan Conrad + camalot@gmail.com + + + + + + repo.jenkins-ci.org + http://repo.jenkins-ci.org/public/ + + + + + repo.jenkins-ci.org + http://repo.jenkins-ci.org/public/ + + + + diff --git a/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly b/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly new file mode 100644 index 0000000..876fe2d --- /dev/null +++ b/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly @@ -0,0 +1,4 @@ + + + + diff --git a/plugin/src/main/resources/index.jelly b/plugin/src/main/resources/index.jelly new file mode 100644 index 0000000..f9f2627 --- /dev/null +++ b/plugin/src/main/resources/index.jelly @@ -0,0 +1,7 @@ + + +
+ Changes Jenkins theme to a Dark Theme. +
From 7a4f38820a5bb85ea0156b60b9c58f7b245d05dc Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 15:23:59 -0500 Subject: [PATCH 04/31] update appveyor.yml to try to get building. --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 111893a..853747c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,9 +5,10 @@ environment: nodejs_version: 5.11.0 install: - ps: Install-Product node $env:nodejs_version x64 +- cmd: npm install -g grunt-cli - cmd: npm install -g less - cmd: npm install -g less-plugin-clean-css -- cmd: npm install -g grunt +- cmd: npm install - ps: | $mvnVersion = '3.2.5' Add-Type -AssemblyName System.IO.Compression.FileSystem From 0ac5729686e77ddba276b725a550dcfa5f3e606e Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 15:32:14 -0500 Subject: [PATCH 05/31] update yml --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 853747c..e0f60f9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,6 +8,7 @@ install: - cmd: npm install -g grunt-cli - cmd: npm install -g less - cmd: npm install -g less-plugin-clean-css +- cmd: npm update -g npm - cmd: npm install - ps: | $mvnVersion = '3.2.5' From f1c71d0c10ed865044c8a564e74df3cdbba4ef1a Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 15:42:25 -0500 Subject: [PATCH 06/31] fixed the package.json --- appveyor.yml | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index e0f60f9..a5eee97 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,9 +5,9 @@ environment: nodejs_version: 5.11.0 install: - ps: Install-Product node $env:nodejs_version x64 -- cmd: npm install -g grunt-cli -- cmd: npm install -g less -- cmd: npm install -g less-plugin-clean-css +- cmd: npm install grunt-cli +- cmd: npm install less +- cmd: npm install less-plugin-clean-css - cmd: npm update -g npm - cmd: npm install - ps: | diff --git a/package.json b/package.json index 5af72bc..129255c 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "keywords": [ "stylish", - "theme" + "theme", "jenkins" ], "author": "Ryan Conrad", From 2134e6b6a9ada61f452edc95c93227852a433557 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 15:47:44 -0500 Subject: [PATCH 07/31] install grunt global --- appveyor.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a5eee97..b215fe6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,9 +5,10 @@ environment: nodejs_version: 5.11.0 install: - ps: Install-Product node $env:nodejs_version x64 -- cmd: npm install grunt-cli -- cmd: npm install less -- cmd: npm install less-plugin-clean-css +- cmd: npm install -g grunt-cli +- cmd: npm install -g grunt +- cmd: npm install -g less +- cmd: npm install -g less-plugin-clean-css - cmd: npm update -g npm - cmd: npm install - ps: | From 4173dd0ccd513ccf7fd8755df5de764718b1a75b Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 16:26:40 -0500 Subject: [PATCH 08/31] new grunt config. --- Gruntfile-orig.js | 137 +++++++++++++++ gruntfile.js | 191 ++++++++------------- jenkins-dark.less | 424 +++++++++++++++++++++++----------------------- package.json | 4 +- 4 files changed, 422 insertions(+), 334 deletions(-) create mode 100644 Gruntfile-orig.js diff --git a/Gruntfile-orig.js b/Gruntfile-orig.js new file mode 100644 index 0000000..43df5d9 --- /dev/null +++ b/Gruntfile-orig.js @@ -0,0 +1,137 @@ +module.exports = function(grunt) { + require('load-grunt-tasks')(grunt); + + var pkg = grunt.file.readJSON('package.json'); + + grunt.initConfig({ + clean: { + dist: { + src: ["dist/*"] + } + }, + + less: { + dist: { + files: { + "dist/jenkins-dark.css": "jenkins-dark.less" + } + } + }, + + // imageEmbed: { + // light: { + // src: ["dist/jenkins-dark.css"], + // dest: "dist/jenkins-dark.css", + // options: { + // deleteAfterEncoding: false + // } + // } + // }, + + cssmin: { + target: { + files: [{ + expand: true, + cwd: 'release/css', + src: ['*.css', '!*.min.css'], + dest: 'release/css', + ext: '.min.css' + }] + } + }, + imagemin: { + dynamic: { + options: { + svgoPlugins: [{ + removeViewBox: true, + removeDoctype: true, + removeXMLProcInst: true, + removeComments: true, + removeMetadata: true, + removeTitle: true, + removeDesc: true, + removeUselessDefs: true, + removeEditorsNSData: true, + removeEmptyAttrs: true, + removeHiddenElems: true, + removeEmptyText: true, + removeEmptyContainers: true, + removeViewBox: true, + cleanUpEnableBackground: true, + minifyStyles: true, + convertStyleToAttrs: true, + convertColors: true, + convertPathData: true, + convertTransform: true, + removeUnknownsAndDefaults: true, + removeNonInheritableGroupAttrs: true, + removeUselessStrokeAndFill: true, + removeUnusedNS: true, + cleanupIDs: true, + cleanupNumericValues: true, + moveElemsAttrsToGroup: true, + moveGroupAttrsToElems: true, + collapseGroups: true, + removeRasterImages: true, + mergePaths: true, + convertShapeToPath: true, + sortAttrs: true, + transformsWithOnePath: true, + removeDimensions: true, + removeAttrs: true, + addClassesToSVGElement: true, + removeStyleElement: true + }] + }, + files: [{ + expand: true, + cwd: 'node_modules/jenkins-core-theme/images/', + src: ['**/*.svg'], + dest: 'node_modules/jenkins-core-theme/images/' + }] + } + + }, + + replace: { + dist: { + options: { + patterns: [{ + match: 'version', + replacement: pkg.version + }, { + match: /jenkins-dark-theme<\/artifactId>\s+[^>]*<\/version>/g, + replacement: 'jenkins-dark-theme\n ' + pkg.version + '' + }] + }, + files: [{ + src: ['dist/jenkins-dark.css'], + dest: 'dist/jenkins-dark.css' + }, { + src: ['plugin/pom.xml'], + dest: 'plugin/pom.xml' + }] + } + }, + postcss: { + options: { + map: false, + processors: [ + require('autoprefixer')({ + browsers: 'last 2 versions' + }), // add vendor prefixes + require('postcss-encode-base64-inlined-images'), + require('cssnano')() // minify the result + ] + }, + dist: { + src: 'dist/jenkins-dark*.css' + } + } + }); + + // Default task(s). + grunt.registerTask('default', ['clean', 'imagemin', 'less', 'replace', 'cssmin', 'postcss']); + + +}; diff --git a/gruntfile.js b/gruntfile.js index 6856fc3..be9b9be 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -1,133 +1,76 @@ -module.exports = function (grunt) { +module.exports = function(grunt) { require('load-grunt-tasks')(grunt); var pkg = grunt.file.readJSON('package.json'); grunt.initConfig({ + clean: { + dist: { + src: ["dist/*"] + } + }, - - clean: { - dist: { - src: ["dist/*"] - } - }, - - less: { - dist: { - files: { - "dist/jenkins-dark.css": "less/jenkins-dark.less" - } - } - }, - - // imageEmbed: { - // light: { - // src: ["dist/jenkins-dark.css"], - // dest: "dist/jenkins-dark.css", - // options: { - // deleteAfterEncoding: false - // } - // } - // }, - - cssmin: { - minify: { - files: { - 'dist/jenkins-dark.css': ['dist/jenkins-dark.min.css'] - } - } - }, - imagemin: { - dynamic: { - options: { - svgoPlugins: [{ - removeViewBox: true, - removeDoctype: true, - removeXMLProcInst: true, - removeComments: true, - removeMetadata: true, - removeTitle: true, - removeDesc: true, - removeUselessDefs: true, - removeEditorsNSData: true, - removeEmptyAttrs: true, - removeHiddenElems: true, - removeEmptyText: true, - removeEmptyContainers: true, - removeViewBox: true, - cleanUpEnableBackground: true, - minifyStyles: true, - convertStyleToAttrs: true, - convertColors: true, - convertPathData: true, - convertTransform: true, - removeUnknownsAndDefaults: true, - removeNonInheritableGroupAttrs: true, - removeUselessStrokeAndFill: true, - removeUnusedNS: true, - cleanupIDs: true, - cleanupNumericValues: true, - moveElemsAttrsToGroup: true, - moveGroupAttrsToElems: true, - collapseGroups: true, - removeRasterImages: true, - mergePaths: true, - convertShapeToPath: true, - sortAttrs: true, - transformsWithOnePath: true, - removeDimensions: true, - removeAttrs: true, - addClassesToSVGElement: true, - removeStyleElement: true - }] - }, - files: [{ - expand: true, - cwd: 'node_modules/jenkins-core-theme/images/', - src: ['**/*.svg'], - dest: 'node_modules/jenkins-core-theme/images/' - }] - } - - }, - - replace: { - dist: { - options: { - patterns: [ - { - match: 'version', - replacement: pkg.version - }, - { - match: /jenkins-dark-theme<\/artifactId>\s+[^>]*<\/version>/g, - replacement: 'jenkins-dark-theme\n ' + pkg.version + '' - } - ] - }, - files: [ - {src: ['dist/jenkins-dark.css'], dest: 'dist/jenkins-dark.css'}, - {src: ['plugin/pom.xml'], dest: 'plugin/pom.xml'} - ] - } + less: { + dist: { + options: { + //paths: ["assets/css"] + }, + files: {"dist/jenkins-dark.css": "jenkins-dark.less"} + } + }, + cssmin: { + target: { + files: [{ + expand: true, + cwd: 'dist/', + src: ['*.css', '!*.min.css'], + dest: 'dist/', + ext: '.min.css' + }] + } + }, + replace: { + dist: { + options: { + patterns: [{ + match: /\${VERSION}/g, + replacement: pkg.version + }, { + match: /jenkins-dark-theme<\/artifactId>\s+[^>]*<\/version>/g, + replacement: 'jenkins-dark-theme\n ' + pkg.version + '' + }] + }, + files: [{ + src: ['dist/jenkins-dark.css'], + dest: 'dist/jenkins-dark.css' + }, { + src: ['plugin/pom.xml'], + dest: 'plugin/pom.xml' + }] + } + }, + postcss: { + options: { + map: false, + processors: [ + require('autoprefixer')({ + browsers: 'last 2 versions' + }), // add vendor prefixes + require('postcss-encode-base64-inlined-images'), + require('cssnano')() // minify the result + ] }, - postcss: { - options: { - map: false, - processors: [ - require('autoprefixer')({browsers: 'last 2 versions'}), // add vendor prefixes - require('postcss-encode-base64-inlined-images'), - require('cssnano')() // minify the result - ] - }, - dist: { - src: 'dist/jenkins-dark*.css' - } + dist: { + files: [{ + expand: true, + cwd: 'dist/', + src: ['*.css', '!*.min.css'], + dest: 'dist/', + ext: '.min.css' + }] } + } }); - - // Default task(s). - grunt.registerTask('default', ['clean', 'imagemin', 'less', 'replace', 'cssmin', 'postcss']); - - -}; + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.registerTask('default', ['clean', 'less', 'replace', 'cssmin', 'postcss']); +} diff --git a/jenkins-dark.less b/jenkins-dark.less index da9cab2..b25bcf7 100644 --- a/jenkins-dark.less +++ b/jenkins-dark.less @@ -1,209 +1,217 @@ +/** +* Author: Ryan Conrad +* Version: ${VERSION} +* GitHub: https://github.com/camalot/jenkins-dark-stylish/ +* Issues: https://github.com/camalot/jenkins-dark-stylish/issues +**/ @import url( './parts/_variables.less'); -//@-moz-document domain("my-jenkins-ci-host.com") { - @import url( './parts/_keyframes.less'); - ::-webkit-scrollbar { - max-width: 10px !important; - max-height: 10px !important; - background: lighten(@background-light,8.8%) !important; - } - ::-webkit-scrollbar-corner, - ::-webkit-scrollbar-track { - background: lighten(@background-light,8.8%) !important; - } - ::-webkit-scrollbar-thumb { - border-radius: 5px !important; - background: rgba(80,80,80,.6) !important; - } - ::-webkit-scrollbar-corner, - ::-webkit-scrollbar-track { - background: lighten(@background-light,8.8%) !important; - } - ::selection { - background-color: lighten(@blue,20%) !important; - color: @white !important; - } - #main-panel, - .bottom-sticker-inner, - .top-sticker-inner, - body, - html { - background: @background-dark; - color: @text-light; - } - #breadcrumbBar, - #footer-container { - background: @background-black; - color: @text-light; - } - body, - form, - p, - table, - td, - th { - color: @text-light; - } - form { - margin: 0; - padding: 0; - } - .model-link, - a, - a:link, - a:visited { - text-decoration: none; - color: @blue; - outline: none; - } - .setting-input, - input[type='password']:hover, - input[type='text']:hover { - border-color: #4183C4; - } - .setting-input, - input[type='password'], - input[type='text'] { - font-size: 1.2em; - border: solid 1px #111; - color: @text-light; - background-color: #3a3a3a; - outline: none; - padding: 6px 5px 4px; - border-radius: 0; - box-shadow: none; - } - footer { - background: @background-black; - color: @text-light; - border-color: @background-333; - border-bottom: none; - } - #header { - background: @background-black; - } - @import url( './parts/_notifications.less'); - @import url( './parts/_wtf.less'); - @import url( './parts/_code-editor.less'); - .bottom-sticker-edge { - /* hide the shadow on the bottom panel */ - display: none; - } - #menuSelector, - .healthReportDetails { - -webkit-filter: invert(100%); - } - .healthReportDetails img { - -webkit-filter: invert(100%); - } - .hetero-list-container .dd-handle, - .repeated-container .dd-handle { - background-image: @drag-handle-image; - } - .repeated-chunk.hover { - border-color: #111; - } - @import url( './parts/_icons.less'); - .greyed { - color: #d1d1d1; - } - .redbold { - color: darkred; - font-weight: bold; - } - .greenbold { - color: #6c0; - font-weight: bold; - } - .inverse { - color: @black; - } - .section-header { - margin: 5px; - padding: 10px; - font-size: 3em; - background-color: @blue; - color: @text-light; - text-transform: uppercase; - border: none; - border-bottom: none; - } - @import url("./parts/_breadcrumbs.less"); - @import url("./parts/_side-panel.less"); - @import url("./parts/_main-panel.less"); - - - /* bigtable */ - .bigtable tr { - border: 1px solid @background-dark; - } - #projectstatus .header { - border-bottom-color: @background-dark; - } - .bigtable th, - .bigtable tr.header { - background-color: @background-black; - border-color: @background-dark; - color: @text-light; - } - table.sortable span.sortarrow { - color: @text-light; - } - .bigtable tr.header th { - background-color: @background-black; - color: @text-light; - } - table.sortable a.sortheader { - color: @text-light; - } - table.bigtable.pane > tbody > tr > td:last-child {} - .pane-frame .bigtable tr, - .pane-frame table {} - table.stripped tr:nth-child(even) { - background: @background-black; - color: @text-light; - } - .bigtable .plugin-category td.pane { - font-size: 3em; - text-align: center; - text-transform: uppercase; - background-color: #4183C4; - color: @text-light; - } - @import url( './parts/_dashboard.less'); - @import url( './parts/_buildHistory.less'); - @import url( './parts/_tasks.less'); - #buildQueue .pane[colspan='2'] { - text-align: center; - padding: 10px 0; - color: #999; - } - @import url( './parts/_login.less'); - .setting-name { - text-transform: capitalize; - vertical-align: middle; - } - .setting-name::after {} - #filter-box, - #search-box { - border: solid 1px @background-black; - border-radius: 0; - box-shadow: none; - background: #3a3a3a @search-image-16 3px center no-repeat !important; - padding: 4px 3px 4px 25px !important; - color: @text-light; - } - #filter-box:hover, - #search-box:hover { - border-color: @blue; - } - @import url( './parts/_buttons.less'); - @import url( './parts/_tabs.less'); - /* this is the trend timeline */ - .timeline-container { - -webkit-filter: invert(80%); - } - /* this is inside the timeline, so we invert it back to normal */ - .timeline-container .timeline-event-icon > img { - -webkit-filter: invert(80%); - } -//} +.jenkins_ver::after { + content: ' : Jenkins-Dark v${VERSION}'; +} +#l10n-footer { + display: none; +} +@import url( './parts/_keyframes.less'); +::-webkit-scrollbar { + max-width: 10px !important; + max-height: 10px !important; + background: lighten(@background-light,8.8%) !important; +} +::-webkit-scrollbar-corner, +::-webkit-scrollbar-track { + background: lighten(@background-light,8.8%) !important; +} +::-webkit-scrollbar-thumb { + border-radius: 5px !important; + background: rgba(80,80,80,.6) !important; +} +::-webkit-scrollbar-corner, +::-webkit-scrollbar-track { + background: lighten(@background-light,8.8%) !important; +} +::selection { + background-color: lighten(@blue,20%) !important; + color: @white !important; +} +#main-panel, +.bottom-sticker-inner, +.top-sticker-inner, +body, +html { + background: @background-dark; + color: @text-light; +} +#breadcrumbBar, +#footer-container { + background: @background-black; + color: @text-light; +} +body, +form, +p, +table, +td, +th { + color: @text-light; +} +form { + margin: 0; + padding: 0; +} +.model-link, +a, +a:link, +a:visited { + text-decoration: none; + color: @blue; + outline: none; +} +.setting-input, +input[type='password']:hover, +input[type='text']:hover { + border-color: #4183C4; +} +.setting-input, +input[type='password'], +input[type='text'] { + font-size: 1.2em; + border: solid 1px #111; + color: @text-light; + background-color: #3a3a3a; + outline: none; + padding: 6px 5px 4px; + border-radius: 0; + box-shadow: none; +} +footer { + background: @background-black; + color: @text-light; + border-color: @background-333; + border-bottom: none; +} +#header { + background: @background-black; +} +@import url( './parts/_notifications.less'); +@import url( './parts/_wtf.less'); +@import url( './parts/_code-editor.less'); +.bottom-sticker-edge { + /* hide the shadow on the bottom panel */ + display: none; +} +#menuSelector, +.healthReportDetails { + -webkit-filter: invert(100%); +} +.healthReportDetails img { + -webkit-filter: invert(100%); +} +.hetero-list-container .dd-handle, +.repeated-container .dd-handle { + background-image: @drag-handle-image; +} +.repeated-chunk.hover { + border-color: #111; +} +@import url( './parts/_icons.less'); +.greyed { + color: #d1d1d1; +} +.redbold { + color: darkred; + font-weight: bold; +} +.greenbold { + color: #6c0; + font-weight: bold; +} +.inverse { + color: @black; +} +.section-header { + margin: 5px; + padding: 10px; + font-size: 3em; + background-color: @blue; + color: @text-light; + text-transform: uppercase; + border: none; + border-bottom: none; +} +@import url("./parts/_breadcrumbs.less"); +@import url("./parts/_side-panel.less"); +@import url("./parts/_main-panel.less"); +/* bigtable */ +.bigtable tr { + border: 1px solid @background-dark; +} +#projectstatus .header { + border-bottom-color: @background-dark; +} +.bigtable th, +.bigtable tr.header { + background-color: @background-black; + border-color: @background-dark; + color: @text-light; +} +table.sortable span.sortarrow { + color: @text-light; +} +.bigtable tr.header th { + background-color: @background-black; + color: @text-light; +} +table.sortable a.sortheader { + color: @text-light; +} +table.bigtable.pane > tbody > tr > td:last-child {} +.pane-frame .bigtable tr, +.pane-frame table {} +table.stripped tr:nth-child(even) { + background: @background-black; + color: @text-light; +} +.bigtable .plugin-category td.pane { + font-size: 3em; + text-align: center; + text-transform: uppercase; + background-color: #4183C4; + color: @text-light; +} +@import url( './parts/_dashboard.less'); +@import url( './parts/_buildHistory.less'); +@import url( './parts/_tasks.less'); +#buildQueue .pane[colspan='2'] { + text-align: center; + padding: 10px 0; + color: #999; +} +@import url( './parts/_login.less'); +.setting-name { + text-transform: capitalize; + vertical-align: middle; +} +.setting-name::after {} +#filter-box, +#search-box { + border: solid 1px @background-black; + border-radius: 0; + box-shadow: none; + background: #3a3a3a @search-image-16 3px center no-repeat !important; + padding: 4px 3px 4px 25px !important; + color: @text-light; +} +#filter-box:hover, +#search-box:hover { + border-color: @blue; +} +@import url( './parts/_buttons.less'); +@import url( './parts/_tabs.less'); +/* this is the trend timeline */ +.timeline-container { + -webkit-filter: invert(80%); +} +/* this is inside the timeline, so we invert it back to normal */ +.timeline-container .timeline-event-icon > img { + -webkit-filter: invert(80%); +} diff --git a/package.json b/package.json index 129255c..a78da37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jenkins-dark-theme", - "version": "0.1.0", + "version": "0.1.1", "description": "A dark theme for Jenkins", "repository": { "type": "git", @@ -24,7 +24,7 @@ "grunt-contrib-cssmin": "^0.6.2", "grunt-contrib-imagemin": "^1.0.0", "grunt-contrib-jshint": "^0.6.5", - "grunt-contrib-less": "^1.1.0", + "grunt-contrib-less": "^1.3.0", "grunt-contrib-uglify": "^0.2.7", "grunt-image-embed": "^0.3.3", "grunt-postcss": "^0.7.2", From c4e6e9ef17d427962f96d42cfbac32f503d259dc Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 16:36:52 -0500 Subject: [PATCH 09/31] working through the build script --- appveyor.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b215fe6..0a9d6d7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,12 +27,15 @@ install: build_script: - cmd: grunt - cmd: mkdir -p .\plugin\src\main\webapp -- cmd: xcopy .\dist\* .\plugin\src\main\webapp\ /h /i /c /k /y -- ps: Compress-Archive -Path ${env:APPVEYOR_BUILD_FOLDER}/dist/*.css -DestinationPath ./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip -- ps: Remove-Item -Path '.\plugin\target' | Out-Null +- cmd: xcopy .\dist\*.min.css .\plugin\src\main\webapp\ /h /i /c /k /y +- ps: Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" +- ps: | + if ( (Test-Path -Path ".\plugin\target") ) { + Remove-Item -Path '.\plugin\target' | Out-Null; + } - cmd: | - cd plugin - mvn package + cd plugin + mvn package - cmd: xcopy plugin\target\*.hpi .\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi /h /c /k /y artifacts: - path: dist/jenkins-dark.css From 58a63a6ee4901c618707acdfe6c83892a72a868f Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 16:46:14 -0500 Subject: [PATCH 10/31] working through the build script --- plugin/{src/main => }/pom.xml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plugin/{src/main => }/pom.xml (100%) diff --git a/plugin/src/main/pom.xml b/plugin/pom.xml similarity index 100% rename from plugin/src/main/pom.xml rename to plugin/pom.xml From 365ae32303a29ba29b9a9f8fec77023d1125537d Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 17:08:50 -0500 Subject: [PATCH 11/31] try to fix final xcopy --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 0a9d6d7..1de1ab1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,7 +36,7 @@ build_script: - cmd: | cd plugin mvn package -- cmd: xcopy plugin\target\*.hpi .\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi /h /c /k /y +- ps: '& xcopy "${env:APPVEYOR_BUILD_FOLDER}\\plugin\\target\\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y' artifacts: - path: dist/jenkins-dark.css name: css From 145b4bb68a5e0cac66b82c3eaedd4b490f4e7bd6 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 17:23:57 -0500 Subject: [PATCH 12/31] try to fix final xcopy --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1de1ab1..2a75a31 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,13 +30,13 @@ build_script: - cmd: xcopy .\dist\*.min.css .\plugin\src\main\webapp\ /h /i /c /k /y - ps: Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" - ps: | - if ( (Test-Path -Path ".\plugin\target") ) { - Remove-Item -Path '.\plugin\target' | Out-Null; + if ( (Test-Path -Path "${env:APPVEYOR_BUILD_FOLDER}\plugin\target") ) { + Remove-Item -Path '${env:APPVEYOR_BUILD_FOLDER}\plugin\target' | Out-Null; } - cmd: | cd plugin mvn package -- ps: '& xcopy "${env:APPVEYOR_BUILD_FOLDER}\\plugin\\target\\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y' +- ps: '& xcopy "${env:APPVEYOR_BUILD_FOLDER}\\plugin\\target\\jenkins-dark-theme.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y' artifacts: - path: dist/jenkins-dark.css name: css From 838e9446199e9d57e040d9aa24d6c628a9b67fda Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 17:40:45 -0500 Subject: [PATCH 13/31] added sleep before final xcopy --- appveyor.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2a75a31..f638fd9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,15 +28,18 @@ build_script: - cmd: grunt - cmd: mkdir -p .\plugin\src\main\webapp - cmd: xcopy .\dist\*.min.css .\plugin\src\main\webapp\ /h /i /c /k /y -- ps: Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" - ps: | - if ( (Test-Path -Path "${env:APPVEYOR_BUILD_FOLDER}\plugin\target") ) { - Remove-Item -Path '${env:APPVEYOR_BUILD_FOLDER}\plugin\target' | Out-Null; + Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" + $target = "${env:APPVEYOR_BUILD_FOLDER}\plugin\target"; + if ( (Test-Path -Path $target) ) { + Remove-Item -Path $target | Out-Null; } -- cmd: | - cd plugin - mvn package -- ps: '& xcopy "${env:APPVEYOR_BUILD_FOLDER}\\plugin\\target\\jenkins-dark-theme.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y' + Set-Location $target; + & mvn package; + "Sleeping..." | Write-Host; + Start-Sleep -s 15' + "Time to wake up..." | Write-Host; + & xcopy "$target\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y artifacts: - path: dist/jenkins-dark.css name: css From e296bb29d4dd78b25d8b8f93002224cffd3352f9 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 17:46:42 -0500 Subject: [PATCH 14/31] added sleep before final xcopy --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f638fd9..7024be4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ build_script: Set-Location $target; & mvn package; "Sleeping..." | Write-Host; - Start-Sleep -s 15' + Start-Sleep -s 15; "Time to wake up..." | Write-Host; & xcopy "$target\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y artifacts: From 544713fcba6b066b23aebe67e68900cbf0852930 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 18:09:48 -0500 Subject: [PATCH 15/31] tweaking the maven execution --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7024be4..b081e72 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,11 +30,13 @@ build_script: - cmd: xcopy .\dist\*.min.css .\plugin\src\main\webapp\ /h /i /c /k /y - ps: | Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" - $target = "${env:APPVEYOR_BUILD_FOLDER}\plugin\target"; + $plugin = "${env:APPVEYOR_BUILD_FOLDER}\plugin\"; + $target = Join-Path -Path $plugin -ChildPath target; if ( (Test-Path -Path $target) ) { Remove-Item -Path $target | Out-Null; } - Set-Location $target; + Create-Item -Path $target -ItemType Folder -Force | Out-Null; + Set-Location $plugin; & mvn package; "Sleeping..." | Write-Host; Start-Sleep -s 15; From 16bdb2ce67609f2ba926950328a5f1a178903793 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 18:16:24 -0500 Subject: [PATCH 16/31] i'm dumb... that isn't even a command... --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b081e72..6e34192 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,7 +35,7 @@ build_script: if ( (Test-Path -Path $target) ) { Remove-Item -Path $target | Out-Null; } - Create-Item -Path $target -ItemType Folder -Force | Out-Null; + New-Item -Path $target -ItemType Folder -Force | Out-Null; Set-Location $plugin; & mvn package; "Sleeping..." | Write-Host; From bebc6fa9d78a1f33397c59125279064d5b85ce90 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 18:22:15 -0500 Subject: [PATCH 17/31] i'm dumb... that isn't even a command... --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6e34192..3ea8b59 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,7 +35,7 @@ build_script: if ( (Test-Path -Path $target) ) { Remove-Item -Path $target | Out-Null; } - New-Item -Path $target -ItemType Folder -Force | Out-Null; + New-Item -Path $target -ItemType Directory -Force | Out-Null; Set-Location $plugin; & mvn package; "Sleeping..." | Write-Host; From 27528af29cea024d75ee2cad0c3fc482b2be526a Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 19:32:08 -0500 Subject: [PATCH 18/31] xcopy changes --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 3ea8b59..0fdffdb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,7 +41,7 @@ build_script: "Sleeping..." | Write-Host; Start-Sleep -s 15; "Time to wake up..." | Write-Host; - & xcopy "$target\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\\dist\\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /k /y + & xcopy "$target\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /y artifacts: - path: dist/jenkins-dark.css name: css From 986066aac918c86ff88ae4bb29eb5c41d9f12eaf Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 20:20:22 -0500 Subject: [PATCH 19/31] xcopy changes to just use copy --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 0fdffdb..14029cd 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -41,7 +41,7 @@ build_script: "Sleeping..." | Write-Host; Start-Sleep -s 15; "Time to wake up..." | Write-Host; - & xcopy "$target\*.hpi" "${env:APPVEYOR_BUILD_FOLDER}\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" /h /c /y + & copy "$target\jenkins-dark-theme.hpi" "${env:APPVEYOR_BUILD_FOLDER}\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" artifacts: - path: dist/jenkins-dark.css name: css @@ -50,8 +50,8 @@ artifacts: - path: dist/*.hpi name: hpi cache: - - c:\maven\ - - c:\Users\appveyor\.m2\ + - c:\maven + - c:\Users\appveyor\.m2 deploy: - provider: GitHub tag: $(APPVEYOR_PROJECT_NAME)-$(APPVEYOR_BUILD_VERSION) From 468a5e5b0c2d28b676a202aadb2f9b4e9a778e90 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 21:06:20 -0500 Subject: [PATCH 20/31] updated readme and the buildscript. --- README.md | 34 ++++++++++++++++++++-------------- appveyor.yml | 10 +++++----- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 492c23d..c575e8c 100644 --- a/README.md +++ b/README.md @@ -5,29 +5,35 @@ A stylish for Jenkins to give a dark theme. NOTE: This has not been tested with Jenkins 2.x. ``` -You will need to add the domains that you want this to apply to yourself. - -``` - @-moz-document domain("my-jenkins-ci-host.com") { ... } -``` +You will need to add the domains that you want this to apply to yourself if you use the Stylish plugin. ## How to install -_note: these steps may be slightly different for FireFox version of Stylish_ +### Jenkins Plugin + +- Download the [latest release hpi file](https://github.com/camalot/jenkins-dark-stylish/releases/latest) +- Go to `Jenkins -> Manage Jenkins -> Manage Plugins` +- Go to the `Advanced` tab +- Go to the `Upload Plugin` section +- Select the `hpi` file you downloaded +- Click `Upload` +- Restart Jenkins +- Profit! + +### Stylish + +_NOTE: these steps may be slightly different for FireFox version of Stylish_ - Install Stylish: - [Chrome][stylish-chrome] - [Firefox][stylish-firefox] -- Download the [latest release](https://github.com/camalot/jenkins-dark-stylish/releases/latest) +- Download the [latest release zip](https://github.com/camalot/jenkins-dark-stylish/releases/latest) - Extract to a known location -- Open the `css` file in your text editor of choice -- Modify the `@-moz-document` line to contain the domains you want to apply this to - - `@-moz-document domain("my-jenkins-ci-host.com") { ... }` -- Save the changes -- Open the Stylish Style Manager (_Manage installed styles._) -- Click on _Write new Style_ -- Under _Mozilla Format_, Click on _Import_ button +- Open the Stylish Style Manager (`Manage installed styles`) +- Click on `Write new Style` +- Under `Mozilla Format`, Click on `Import` button - Select the `jenkins-dark.css` file that you extracted earlier +- Add your domains that you want this to apply to - Profit! ## Screenshots diff --git a/appveyor.yml b/appveyor.yml index 14029cd..c77e0b2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,13 +22,13 @@ install: [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven") } - cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;%PATH% -- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g +- cmd: SET MAVEN_OPTS=-Xmx4g - cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g build_script: -- cmd: grunt -- cmd: mkdir -p .\plugin\src\main\webapp -- cmd: xcopy .\dist\*.min.css .\plugin\src\main\webapp\ /h /i /c /k /y - ps: | + & grunt; + & mkdir -p "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; + & xcopy ${env:APPVEYOR_BUILD_FOLDER}\dist\*.min.css ${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp\ /h /i /c /k /y Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" $plugin = "${env:APPVEYOR_BUILD_FOLDER}\plugin\"; $target = Join-Path -Path $plugin -ChildPath target; @@ -37,7 +37,7 @@ build_script: } New-Item -Path $target -ItemType Directory -Force | Out-Null; Set-Location $plugin; - & mvn package; + & mvn package -B; "Sleeping..." | Write-Host; Start-Sleep -s 15; "Time to wake up..." | Write-Host; From 34b04826e8a525bc9ac18f4b08da24c35de26d6a Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 21:34:13 -0500 Subject: [PATCH 21/31] fixed the path in the jelly header to load the correct path. --- .../com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly b/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly index 876fe2d..ece186c 100644 --- a/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly +++ b/plugin/src/main/resources/com/bit13/jenkins/JenkinsDarkThemeDecorator/header.jelly @@ -1,4 +1,4 @@ - + From 1c89ed25f5febbead8374a47d902c35655cdc271 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 22:26:09 -0500 Subject: [PATCH 22/31] updated readme. added after_deploy for publishing to github.io --- README.md | 29 ++++++++++++++++++++++------- appveyor.yml | 25 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c575e8c..473dccf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # jenkins-dark [![Build status](https://ci.appveyor.com/api/projects/status/14lnufroy4v83xjk?svg=true)](https://ci.appveyor.com/project/camalot/jenkins-dark-stylish) -A stylish for Jenkins to give a dark theme. +A theme for Jenkins to give a dark look. ``` NOTE: This has not been tested with Jenkins 2.x. @@ -9,11 +9,16 @@ You will need to add the domains that you want this to apply to yourself if you ## How to install -### Jenkins Plugin +### Simple Theme Jenkins Plugin (auto-updated) +- Install the [Simple Theme Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin) on your Jenkins Server +- Click `Manage Jenkins` +- Click `Configure System` and scroll to `Theme` section +- Specify the URL of `http://camalot.github.io/jenkins-dark-stylish/jenkins-dark.min.css` for the CSS +- Click `Save` +### Native Jenkins Plugin - Download the [latest release hpi file](https://github.com/camalot/jenkins-dark-stylish/releases/latest) -- Go to `Jenkins -> Manage Jenkins -> Manage Plugins` -- Go to the `Advanced` tab +- Go to `Jenkins -> Manage Jenkins -> Manage Plugins -> Advanced` - Go to the `Upload Plugin` section - Select the `hpi` file you downloaded - Click `Upload` @@ -57,11 +62,21 @@ _NOTE: these steps may be slightly different for FireFox version of Stylish_ ## How to build ``` -$ npm install less -$ npm install less-plugin-clean-css -$ lessc --no-color --clean-css ./jenkins-dark.less ./dist/jenkins-dark.css +$ npm install +$ grunt ``` +This will generate the following: + - dist/jenkins-dark.css + - dist/jenkins-dark.min.css + +## How to contribute + +- Fork the _Jenkins-Dark-Stylish_ repository +- Clone the repository +- Create a new branch (eg. `feature/style-menus`) +- Create a pull request into `develop` + [stylish-chrome]: https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en [stylish-firefox]: https://addons.mozilla.org/en-US/firefox/addon/stylish/ diff --git a/appveyor.yml b/appveyor.yml index c77e0b2..ba9198a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,6 +3,12 @@ skip_tags: true image: WMF 5 environment: nodejs_version: 5.11.0 + git_email: + secure: ZLfpxUrw1AeB4Hzmg9poFh3ehcghbjDXbGa1zdUAmb0= + git_name: + secure: bOGR0uSE/yW6nUd9i7fcJg== + gh_access_token: + secure: Es5XTlIJiCiCFJHGDOA09AGFVZQL0jIWtUuPp4+m7MBcfeoVGbWQP2jYU3oSL5bw install: - ps: Install-Product node $env:nodejs_version x64 - cmd: npm install -g grunt-cli @@ -63,3 +69,22 @@ deploy: force_update: true on: branch: master +after_deploy: +- ps: | + if ( $ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $ENV:APPVEYOR_REPO_BRANCH -match 'develop$' ) { + & git config --global credential.helper store; + Add-Content "$ENV:USERPROFILE\.git-credentials" "https://$($ENV:gh_access_token):x-oauth-basic@github.com`n"; + & git config --global user.email "$ENV:git_email" + & git config --global user.name "$ENV:git_user" + $temp = "c:\temp\jenkins-dark-stylish"; + $VERSION = "$ENV:APPVEYOR_BUILD_VERSION"; + if ( !(Test-Path -Path $temp )) { + New-Item -Path $temp -Force -ItemType Directory | Out-Null; + } + & copy "${env:APPVEYOR_BUILD_FOLDER}\dist\*.css" $temp; + & git checkout gh-pages; + & copy "$temp\*.*" ${env:APPVEYOR_BUILD_FOLDER}; + & git add .; + & git commit -m "version $VERSION"; + & git push origin gh-pages; + } From 5d84d39b367809b3ae08e3a5fef52c8170c745d1 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 22:57:45 -0500 Subject: [PATCH 23/31] updated the appveyor script to set the version of the package --- Gruntfile-orig.js | 137 ---------------------------------------------- appveyor.yml | 6 +- package.json | 2 +- 3 files changed, 5 insertions(+), 140 deletions(-) delete mode 100644 Gruntfile-orig.js diff --git a/Gruntfile-orig.js b/Gruntfile-orig.js deleted file mode 100644 index 43df5d9..0000000 --- a/Gruntfile-orig.js +++ /dev/null @@ -1,137 +0,0 @@ -module.exports = function(grunt) { - require('load-grunt-tasks')(grunt); - - var pkg = grunt.file.readJSON('package.json'); - - grunt.initConfig({ - clean: { - dist: { - src: ["dist/*"] - } - }, - - less: { - dist: { - files: { - "dist/jenkins-dark.css": "jenkins-dark.less" - } - } - }, - - // imageEmbed: { - // light: { - // src: ["dist/jenkins-dark.css"], - // dest: "dist/jenkins-dark.css", - // options: { - // deleteAfterEncoding: false - // } - // } - // }, - - cssmin: { - target: { - files: [{ - expand: true, - cwd: 'release/css', - src: ['*.css', '!*.min.css'], - dest: 'release/css', - ext: '.min.css' - }] - } - }, - imagemin: { - dynamic: { - options: { - svgoPlugins: [{ - removeViewBox: true, - removeDoctype: true, - removeXMLProcInst: true, - removeComments: true, - removeMetadata: true, - removeTitle: true, - removeDesc: true, - removeUselessDefs: true, - removeEditorsNSData: true, - removeEmptyAttrs: true, - removeHiddenElems: true, - removeEmptyText: true, - removeEmptyContainers: true, - removeViewBox: true, - cleanUpEnableBackground: true, - minifyStyles: true, - convertStyleToAttrs: true, - convertColors: true, - convertPathData: true, - convertTransform: true, - removeUnknownsAndDefaults: true, - removeNonInheritableGroupAttrs: true, - removeUselessStrokeAndFill: true, - removeUnusedNS: true, - cleanupIDs: true, - cleanupNumericValues: true, - moveElemsAttrsToGroup: true, - moveGroupAttrsToElems: true, - collapseGroups: true, - removeRasterImages: true, - mergePaths: true, - convertShapeToPath: true, - sortAttrs: true, - transformsWithOnePath: true, - removeDimensions: true, - removeAttrs: true, - addClassesToSVGElement: true, - removeStyleElement: true - }] - }, - files: [{ - expand: true, - cwd: 'node_modules/jenkins-core-theme/images/', - src: ['**/*.svg'], - dest: 'node_modules/jenkins-core-theme/images/' - }] - } - - }, - - replace: { - dist: { - options: { - patterns: [{ - match: 'version', - replacement: pkg.version - }, { - match: /jenkins-dark-theme<\/artifactId>\s+[^>]*<\/version>/g, - replacement: 'jenkins-dark-theme\n ' + pkg.version + '' - }] - }, - files: [{ - src: ['dist/jenkins-dark.css'], - dest: 'dist/jenkins-dark.css' - }, { - src: ['plugin/pom.xml'], - dest: 'plugin/pom.xml' - }] - } - }, - postcss: { - options: { - map: false, - processors: [ - require('autoprefixer')({ - browsers: 'last 2 versions' - }), // add vendor prefixes - require('postcss-encode-base64-inlined-images'), - require('cssnano')() // minify the result - ] - }, - dist: { - src: 'dist/jenkins-dark*.css' - } - } - }); - - // Default task(s). - grunt.registerTask('default', ['clean', 'imagemin', 'less', 'replace', 'cssmin', 'postcss']); - - -}; diff --git a/appveyor.yml b/appveyor.yml index ba9198a..52ed3a8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,7 +10,9 @@ environment: gh_access_token: secure: Es5XTlIJiCiCFJHGDOA09AGFVZQL0jIWtUuPp4+m7MBcfeoVGbWQP2jYU3oSL5bw install: -- ps: Install-Product node $env:nodejs_version x64 +- ps: | + Install-Product node $env:nodejs_version x64; + (Get-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json") | foreach { $_ -replace "`${VERISION}", "$ENV:APPVEYOR_BUILD_VERSION" } | Set-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json"; - cmd: npm install -g grunt-cli - cmd: npm install -g grunt - cmd: npm install -g less @@ -71,7 +73,7 @@ deploy: branch: master after_deploy: - ps: | - if ( $ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $ENV:APPVEYOR_REPO_BRANCH -match 'develop$' ) { + if ( $ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $ENV:APPVEYOR_REPO_BRANCH -match 'master$' ) { & git config --global credential.helper store; Add-Content "$ENV:USERPROFILE\.git-credentials" "https://$($ENV:gh_access_token):x-oauth-basic@github.com`n"; & git config --global user.email "$ENV:git_email" diff --git a/package.json b/package.json index a78da37..34b047a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jenkins-dark-theme", - "version": "0.1.1", + "version": "${VERSION}", "description": "A dark theme for Jenkins", "repository": { "type": "git", From fbd11848a6d61ae9461649da74982705b0cc2db6 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 23:06:20 -0500 Subject: [PATCH 24/31] use copy-item instead of copy --- appveyor.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 52ed3a8..7a30a5f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,8 +35,11 @@ install: build_script: - ps: | & grunt; - & mkdir -p "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; - & xcopy ${env:APPVEYOR_BUILD_FOLDER}\dist\*.min.css ${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp\ /h /i /c /k /y + $webapp = "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; + if ( !(Test-Path -Path $webapp) ) { + New-Item -Path $webapp -ItemType Directory -Force | Out-Null; + } + Copy-Item -Path ${env:APPVEYOR_BUILD_FOLDER}\dist\*.min.css -Destination ${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp\ Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" $plugin = "${env:APPVEYOR_BUILD_FOLDER}\plugin\"; $target = Join-Path -Path $plugin -ChildPath target; @@ -49,7 +52,7 @@ build_script: "Sleeping..." | Write-Host; Start-Sleep -s 15; "Time to wake up..." | Write-Host; - & copy "$target\jenkins-dark-theme.hpi" "${env:APPVEYOR_BUILD_FOLDER}\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" + Copy-Item -Path "$target\jenkins-dark-theme.hpi" -Destination "${env:APPVEYOR_BUILD_FOLDER}\dist\${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.hpi" artifacts: - path: dist/jenkins-dark.css name: css From 5742989c39d52a15e6ab2c73cbd9622ee6679ead Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 23:07:36 -0500 Subject: [PATCH 25/31] remove the webapp folder if it exists, and create it after --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 7a30a5f..d6544fb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -36,9 +36,10 @@ build_script: - ps: | & grunt; $webapp = "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; - if ( !(Test-Path -Path $webapp) ) { - New-Item -Path $webapp -ItemType Directory -Force | Out-Null; + if ( (Test-Path -Path $webapp) ) { + Remove-Item -Path $webapp | Out-Null; } + New-Item -Path $webapp -ItemType Directory -Force | Out-Null; Copy-Item -Path ${env:APPVEYOR_BUILD_FOLDER}\dist\*.min.css -Destination ${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp\ Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" $plugin = "${env:APPVEYOR_BUILD_FOLDER}\plugin\"; From 7217045a3280565a47a59e069d5283861d7616a3 Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 23:15:19 -0500 Subject: [PATCH 26/31] create dist folder --- appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index d6544fb..a42028b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -34,6 +34,10 @@ install: - cmd: SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g build_script: - ps: | + $dist = "${env:APPVEYOR_BUILD_FOLDER}\}\dist\"; + if ( !(Test-Path -Path $dist) ) { + New-Item -Path $dist -ItemType Directory -Force; + } & grunt; $webapp = "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; if ( (Test-Path -Path $webapp) ) { @@ -78,6 +82,7 @@ deploy: after_deploy: - ps: | if ( $ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $ENV:APPVEYOR_REPO_BRANCH -match 'master$' ) { + Set-Location "${env:APPVEYOR_BUILD_FOLDER}"; & git config --global credential.helper store; Add-Content "$ENV:USERPROFILE\.git-credentials" "https://$($ENV:gh_access_token):x-oauth-basic@github.com`n"; & git config --global user.email "$ENV:git_email" From 2df595049079f2c57adacd9257c24986f3d3005e Mon Sep 17 00:00:00 2001 From: camalot Date: Thu, 19 May 2016 23:19:42 -0500 Subject: [PATCH 27/31] call grunt from cmd context --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a42028b..2e87d0a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,14 +38,15 @@ build_script: if ( !(Test-Path -Path $dist) ) { New-Item -Path $dist -ItemType Directory -Force; } - & grunt; +- cmd: grunt +- ps: | $webapp = "${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp"; if ( (Test-Path -Path $webapp) ) { Remove-Item -Path $webapp | Out-Null; } New-Item -Path $webapp -ItemType Directory -Force | Out-Null; Copy-Item -Path ${env:APPVEYOR_BUILD_FOLDER}\dist\*.min.css -Destination ${env:APPVEYOR_BUILD_FOLDER}\plugin\src\main\webapp\ - Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "./dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" + Compress-Archive -Path "${env:APPVEYOR_BUILD_FOLDER}/dist/*.css" -DestinationPath "${env:APPVEYOR_BUILD_FOLDER}/dist/${env:APPVEYOR_PROJECT_NAME}-${env:APPVEYOR_BUILD_VERSION}.zip" $plugin = "${env:APPVEYOR_BUILD_FOLDER}\plugin\"; $target = Join-Path -Path $plugin -ChildPath target; if ( (Test-Path -Path $target) ) { From 7138b28fdab076612340c58e6f48db249c138e05 Mon Sep 17 00:00:00 2001 From: camalot Date: Fri, 20 May 2016 09:05:54 -0500 Subject: [PATCH 28/31] tweaks to appveyor scripts --- appveyor.yml | 5 ++--- package.json | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 2e87d0a..a3e915e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -12,11 +12,10 @@ environment: install: - ps: | Install-Product node $env:nodejs_version x64; - (Get-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json") | foreach { $_ -replace "`${VERISION}", "$ENV:APPVEYOR_BUILD_VERSION" } | Set-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json"; + (Get-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json") | foreach { $_ -replace "`"version`": `"0.0.0`"", "`"version`": `"$ENV:APPVEYOR_BUILD_VERSION`"" } | Set-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json"; +- ps: (Get-Content -Path "${env:APPVEYOR_BUILD_FOLDER}\package.json") - cmd: npm install -g grunt-cli - cmd: npm install -g grunt -- cmd: npm install -g less -- cmd: npm install -g less-plugin-clean-css - cmd: npm update -g npm - cmd: npm install - ps: | diff --git a/package.json b/package.json index 34b047a..454949f 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,29 @@ { "name": "jenkins-dark-theme", - "version": "${VERSION}", + "version": "0.0.0", "description": "A dark theme for Jenkins", "repository": { "type": "git", "url": "https://github.com/camalot/jenkins-dark-stylish" }, + "bugs": { + "url": "https://github.com/camalot/jenkins-dark-stylish/issues" + }, "keywords": [ "stylish", "theme", "jenkins" ], - "author": "Ryan Conrad", + "author": { + "name": "Ryan Conrad", + "url": "http://bit13.com/", + "email": "camalot@gmail.com" + }, "contributors": [], - "license": "Apache 2.0", + "license": { + "type": "Apache-2.0", + "url": "https://raw.githubusercontent.com/camalot/jenkins-dark-stylish/master/LICENSE" + }, "devDependencies": { "autoprefixer": "^6.3.3", "cssnano": "^3.5.2", From 5d842598cc21b7c0f6d48ac3a21343e9a4f68bf8 Mon Sep 17 00:00:00 2001 From: camalot Date: Fri, 20 May 2016 09:23:24 -0500 Subject: [PATCH 29/31] version 1.0.1 --- plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index c6d4e05..83436a1 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -10,7 +10,7 @@ com.bit13.jenkins-dark jenkins-dark-theme - 0.1.0 + 0.0.0 hpi Dark Theme Plugin From 6be018b9b04717f07fb3b18db25f04c3dd706b81 Mon Sep 17 00:00:00 2001 From: camalot Date: Fri, 20 May 2016 09:28:35 -0500 Subject: [PATCH 30/31] Revert "version 1.0.1" This reverts commit 5d842598cc21b7c0f6d48ac3a21343e9a4f68bf8. --- plugin/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/pom.xml b/plugin/pom.xml index 83436a1..c6d4e05 100644 --- a/plugin/pom.xml +++ b/plugin/pom.xml @@ -10,7 +10,7 @@ com.bit13.jenkins-dark jenkins-dark-theme - 0.0.0 + 0.1.0 hpi Dark Theme Plugin From d0439d68ac97afe46e1ee059ddc81330d589c1c0 Mon Sep 17 00:00:00 2001 From: camalot Date: Fri, 20 May 2016 09:32:49 -0500 Subject: [PATCH 31/31] updated deployment to ghpages script --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a3e915e..8b1106c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -83,6 +83,7 @@ after_deploy: - ps: | if ( $ENV:APPVEYOR_PULL_REQUEST_NUMBER -eq $null -and $ENV:APPVEYOR_REPO_BRANCH -match 'master$' ) { Set-Location "${env:APPVEYOR_BUILD_FOLDER}"; + & git reset --hard; & git config --global credential.helper store; Add-Content "$ENV:USERPROFILE\.git-credentials" "https://$($ENV:gh_access_token):x-oauth-basic@github.com`n"; & git config --global user.email "$ENV:git_email" @@ -92,10 +93,9 @@ after_deploy: if ( !(Test-Path -Path $temp )) { New-Item -Path $temp -Force -ItemType Directory | Out-Null; } - & copy "${env:APPVEYOR_BUILD_FOLDER}\dist\*.css" $temp; + Copy-Item -Path "${env:APPVEYOR_BUILD_FOLDER}\dist\*.css" -Destination $temp; & git checkout gh-pages; - & copy "$temp\*.*" ${env:APPVEYOR_BUILD_FOLDER}; - & git add .; - & git commit -m "version $VERSION"; + Copy-Item -Path "$temp\*.*" -Destination ${env:APPVEYOR_BUILD_FOLDER}; + & git commit -a -m "version $VERSION"; & git push origin gh-pages; }