Skip to content

Commit

Permalink
Fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
inc2734 committed Oct 11, 2016
1 parent 664d65f commit ce9247a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ editor-style.min.css
packages/
*.sql
./bin/*.xml
wprepository/
mimizuku.zip
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ script:
after_success:
- bash ./app/bin/wprepository.sh
before_deploy:
- rm -rf wprepository
- npm run gulp zip
- bash ./app/bin/zip.sh
deploy:
provider: releases
api_key:
Expand Down
5 changes: 5 additions & 0 deletions app/bin/wprepository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ if [[ "master" != "$TRAVIS_BRANCH" ]]; then
exit
fi

if [[ "7" != "$TRAVIS_PHP_VERSION" ]]; then
echo "deploy only PHP 7"
exit
fi

git clone -b wprepository --quiet https://github.com/inc2734/mimizuku.git wprepository
cd wprepository
ls | xargs rm -rf
Expand Down
4 changes: 4 additions & 0 deletions app/bin/zip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
npm run gulp wprepository
cd wprepository
composer install --no-dev
npm run gulp zip
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "inc2734/mimizuku",
"description": "Minizuku is a WordPress theme to develop the child theme.",
"license": "GPL-2.0+",
"version": "0.1.0",
"version": "0.1.1",
"authors": [
{
"name": "Takashi Kitajima",
Expand Down
10 changes: 9 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,15 @@ gulp.task('wprepository', ['build'], function(){
* Creates the zip file
*/
gulp.task('zip', ['wprepository'], function(){
return gulp.src('wprepository/**/*', {base: 'wprepository'})
return gulp.src(
[
'wprepository/**',
'!wprepository/composer.json',
'!wprepository/composer.lock',
'!wprepository/.git'
]
, {base: './wprepository'}
)
.pipe(zip('mimizuku.zip'))
.pipe(gulp.dest('./'));
});
Expand Down
2 changes: 1 addition & 1 deletion src/stylus/style.styl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Theme URI: https://github.com/inc2734/mimizuku/
Author: inc2734
Author URI: http://2inc.org
Description: Minizuku is a WordPress theme to develop the child theme.
Version: 0.1.0
Version: 0.1.1
License: GPLv2 or later
License URI: license.txt
*/
Expand Down

0 comments on commit ce9247a

Please sign in to comment.