Permalink
Browse files

Automatic releases

  • Loading branch information...
jonathanbardo committed Oct 13, 2016
1 parent f00f7ed commit 3316a892178291b42836b1f3770a53772301a4f6
Showing with 85 additions and 3 deletions.
  1. +8 −0 .distignore
  2. +29 −0 .travis.yml
  3. +43 −0 Gruntfile.js
  4. +5 −3 package.json
View
@@ -0,0 +1,8 @@
.distignore
.git
.gitignore
.travis.yml
.dev
package.json
node_modules
Gruntfile.js
View
@@ -0,0 +1,29 @@
sudo: false
language:
- php
- node_js
before_script:
- curl -s https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli-nightly.phar > /tmp/wp-cli.phar
script:
- echo "Deploy only"
before_deploy:
- export RELEASE_FOLDER=velux
- php /tmp/wp-cli.phar package install runcommand/dist-archive
- cp -rv ${TRAVIS_BUILD_DIR} /tmp/${RELEASE_FOLDER}
- mv /tmp/${RELEASE_FOLDER} ${TRAVIS_BUILD_DIR}
- php /tmp/wp-cli.phar dist-archive ${RELEASE_FOLDER} ${TRAVIS_BUILD_DIR}/${RELEASE_FOLDER}.zip --format=zip --debug
deploy:
provider: releases
api_key:
secure: bq6iVDJDQ8AN8KlRTZGokhX5TtleAYidPFDzEQnnoIEx//A+xZOgM1jyIlf9EW7Y7prD4f07PYWcoRj4C5vFgxhCalQui0jcHseed6PDTQ9gktjETReFy+yzD8KJWAO/FMr3xFCeO2gp5P77jVPxEwZ6dwNKZGTDfAGtyJjFQqACjebDX/UM+Ed5GsTzPdjaRXjq0f8Hn7gU1uTU/g1SFLy/HZHjsr9WWV0HbJdFcD3hDILMdivHfiWLLssLlfnIopCDwdFiTIvpNvUt0eR8YZzcoONJUEiFQM8V+/80hT4QwYj8/oRdO/5I3pJxepp5v/VZiLx/6eZ4do2kTk4A3nbk1T31t5rhH5TuuYXZPunc2ebPSSMw6x74S3U5Z3UCG4y2JmEKQk8otli0P4Pw6tXVLUckotWwEtOvSYs83hncLBxWae5zDRFMt3QPynPCEtIUXfnGjx01Z7M+bJT3IddR/qyzdiao3itQAJhV9r+W0ZqwwnAuPk6kMNfOBAKAZT83+Y7p4+g3MzodkI8joNluo0kCb7ajOa7yQT3kI5oYQ0vUEcOIXKFmSHuXFnEw/bws9TtHp+V5bSWJRQPnAqnxWumJAn6gqvIYiWeFbKxGYESMXtJI7smrdTWmHxK2fNZYrsdG0vxQWy/IpB0/X+xmhX08N1bTXDY4GedhiSY=
file: velux.zip
on:
tags: true
repo: godaddy/wp-velux-theme
skip_cleanup: true
overwrite: true
View
@@ -64,12 +64,55 @@ module.exports = function( grunt ) {
files: '.dev/sass/**/*.scss',
tasks: [ 'sass','autoprefixer','cssjanus' ]
}
},
replace: {
version_php: {
src: [
'**/*.php',
'.dev/**/*.scss'
],
overwrite: true,
replacements: [ {
from: /Version:(\s*?)[a-zA-Z0-9\.\-\+]+$/m,
to: 'Version:$1' + pkg.version
}, {
from: /@version(\s*?)[a-zA-Z0-9\.\-\+]+$/m,
to: '@version$1' + pkg.version
}, {
from: /@since(.*?)NEXT/mg,
to: '@since$1' + pkg.version
}, {
from: /VERSION(\s*?)=(\s*?['"])[a-zA-Z0-9\.\-\+]+/mg,
to: 'VERSION$1=$2' + pkg.version
}, {
from: /'PRIMER_CHILD_VERSION', '[a-zA-Z0-9\.\-\+]+'/mg,
to: '\'PRIMER_CHILD_VERSION\', \'' + pkg.version + '\''
}]
},
version_readme: {
src: 'readme.*',
overwrite: true,
replacements: [ {
from: /^(\*\*|)Stable tag:(\*\*|)(\s*?)[a-zA-Z0-9.-]+(\s*?)$/mi,
to: '$1Stable tag:$2$3<%= pkg.version %>$4'
} ]
},
pot:{
src: 'languages/' + pkg.name + '.pot',
overwrite: true,
replacements: [ {
from: 'charset=CHARSET',
to: 'charset=UTF-8'
} ]
}
}
});
require( 'matchdep' ).filterDev( 'grunt-*' ).forEach( grunt.loadNpmTasks );
grunt.registerTask( 'default', [ 'sass', 'autoprefixer', 'cssjanus' ] );
grunt.registerTask( 'version', [ 'replace' ] );
};
View
@@ -10,18 +10,20 @@
"bugs": {
"url": "https://github.com/godaddy/wp-velux-theme/issues"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-autoprefixer": "~3.0.4",
"grunt-contrib-watch": "~1.0.0",
"grunt-cssjanus": "~0.3.2",
"grunt-dev-update": "~2.0.0",
"grunt-sass": "^1.2.0",
"grunt-text-replace": "^0.4.0",
"load-grunt-tasks": "~3.5.0",
"matchdep": "~1.0.1",
"susy": "~2.2.12"
},
"scripts": {
"version": "grunt version && grunt && git add -A .",
"postversion": "git push && git push --tags"
}
}

0 comments on commit 3316a89

Please sign in to comment.