Skip to content

Commit 764cec6

Browse files
committed
Travis Review
1 parent 06e0d16 commit 764cec6

File tree

2 files changed

+54
-39
lines changed

2 files changed

+54
-39
lines changed

.travis.yml

Lines changed: 53 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,68 @@ matrix:
88
- php: '5.5'
99
- php: '5.6'
1010
- php: '7.0'
11+
env: SNIFF=1
1112
- php: '7.1'
13+
env: DEPLOY=1
1214
before_script:
1315
- export PHPCS_DIR=/tmp/phpcs
1416
- export SNIFFS_DIR=/tmp/sniffs
15-
- git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR
16-
- git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
17-
$SNIFFS_DIR
18-
- git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $SNIFFS_DIR/PHPCompatibility
19-
- "$PHPCS_DIR/scripts/phpcs --config-set installed_paths $SNIFFS_DIR"
20-
- phpenv rehash
21-
- npm install -g jscs
22-
- npm install -g jshint
23-
- wget https://develop.svn.wordpress.org/trunk/.jshintrc
24-
- npm install -g grunt-cli
25-
- npm install
26-
- npm install -g grunt-checktextdomain
17+
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
18+
$PHPCS_DIR; fi
19+
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
20+
$SNIFFS_DIR; fi
21+
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git
22+
$SNIFFS_DIR/PHPCompatibility; fi
23+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
24+
$SNIFFS_DIR; fi
25+
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
26+
- if [[ "$SNIFF" == "1" ]]; then npm install -g jscs; fi
27+
- if [[ "$SNIFF" == "1" ]]; then npm install -g jshint; fi
28+
- if [[ "$SNIFF" == "1" ]]; then wget https://develop.svn.wordpress.org/trunk/.jshintrc;
29+
fi
30+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-cli;
31+
fi
32+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install; fi
33+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-checktextdomain;
34+
fi
2735
script:
2836
- mkdir -p build/logs
2937
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
30-
- jshint ./assets/js/*.js
31-
- jshint ./inc/admin/welcome-screen/js/*.js
32-
- jscs ./assets/js/*.js
33-
- jscs ./inc/admin/welcome-screen/js/*.js
34-
- grunt textdomain
35-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php"
36-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
37-
--extensions=php"
38-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php --standard=./phpcs.ruleset.xml
39-
--extensions=php"
40-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php --standard=./phpcs.ruleset.xml
41-
--extensions=php"
42-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php --standard=./phpcs.ruleset.xml
43-
--extensions=php"
38+
- if [[ "$SNIFF" == "1" ]]; then jshint ./assets/js/*.js; fi
39+
- if [[ "$SNIFF" == "1" ]]; then jshint ./inc/admin/welcome-screen/js/*.js; fi
40+
- if [[ "$SNIFF" == "1" ]]; then jscs ./assets/js/*.js; fi
41+
- if [[ "$SNIFF" == "1" ]]; then jscs ./inc/admin/welcome-screen/js/*.js; fi
42+
- if [[ "$SNIFF" == "1" ]]; then grunt textdomain; fi
43+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml
44+
--extensions=php; fi
45+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
46+
--extensions=php --ignore=./inc/plugin-activation.php,./node_modules/*.php; fi
47+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php
48+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/*.php;
49+
fi
50+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php
51+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/*.php;
52+
fi
53+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php
54+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php;
55+
fi
56+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php
57+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php;
58+
fi
4459
notifications:
4560
email: false
4661
cache:
4762
directories:
4863
- node_modules
49-
#after_success:
50-
#- grunt build-archive
51-
#- sh set_tags.sh
52-
#deploy:
53-
# provider: releases
54-
# skip_cleanup: true
55-
# api_key:
56-
# secure: FbV7d4hcOzhBRs1M/iVlseSqeaeHtLhp+Et6iP7kRVEM5rVl9zmFUppfCweQfBm9Gd4SPJkiRPAtYwKIDZwS3AO9U4jkdYOJCAysVa/zEj+t8DSFsA7EwIstu4CbQVEAADCEAmI/Yth8qbe4jF5Xg29/ykF9WCHXUhYnewSDX/Vr+AbjiitmDqojK9Ea9c0iMlVrOZEgnhfGFxLU4dsh4F/Il2pQiermoAz7r4+apvJG5IDIXFRFgY6L1tIEAnFhDgaLHuTN1QtCgoyeFxHLzSBXEjnPatefjRd4VwCLIyG3NnTSdudI9ddAg+r42ghGtslRrIlZHerc9BWFX0zXkLxVCvem126ol+/x9Uvx6TdAfGb2L3tmkquv1QgeOy0ju7mlwdwO2LepcnMwETpkPF9r4iBpT+S0GF5MbUNO6LQdqQ7Lwk4AKpdWZUO0LHdLGw5JhS99GMZZxICnsHRxBBx0DcCMTAFJsUs6RNND/ugulTUHnTtEF97XkB+2Db4CYQLsDq/hg0pnscywh+VwR3w7P91rKCsw400SsfV7FqOoLlgoexOqHVkTm0DSkNi4HN+/n4xpgByoZeIq1UzWqjyHgUACBIkuNDkP9QwSuxzWACHfYPKbl/iw7FlX9ct5mBKf4Eyeb88WufEyU/wTFHrrCXDv2EoYspPEPNvYBvk=
57-
# file: shapely.zip
58-
# on:
59-
# branch: master
60-
# repo: giucu91/shapely
64+
after_success:
65+
- grunt build-archive
66+
- sh set_tags.sh
67+
deploy:
68+
provider: releases
69+
skip_cleanup: true
70+
api_key:
71+
secure: c+5YqVJhwO0FNgkuXIQAFRwjR0TbJ1e2dcMrIwU33kCeoib5hH5YeI6Qd8eU3EygLkB4RSNyrgHxQWffXtHJmDsy6UQFo98TJ5wuaENUzxWJG4p+ZfGWLBV15t3C5UCL7X0vMFAuOXBqhcpd3sMvF5qPxFLU6vcizj+nxXrHUkPO1Axeu2L7sqbDeOOSr4TkNfV1HOD0B+j+0gLDA3cjI3cKmWDIxyik3dPmBCqr7XzM3I9bGQi1Mfhm75tl3UJgLqLENst8/08zM57hyO4paWTBIhJLy30MjQI2QxG9WAXAze2N5SNfNrKLo74RozEGymWBoQ34aFTsEoURGzg7B81sGvbaOHQwdnZSpoZbeclt9JanARAF8c8qf0/ipCzRcWtOV2/+BVdns+zFj67e2wGE/puIJJhvmZshssQMMci1eskRKqEP0s3CXC/ipiOANo52jT63i5muhKyNXUulLvBM7CaMY0+i1Rwa9jTVNQRu/HyeTOyRgshB2EUO3j7T2V9uYGB2ysvEFPQIDG86sY6n+D97H6hxqMgprgr5echOj0fygLORqY9Bxzy0EyONGkxPJpAYgT9Jo6KvFQ+mVNSorbSKQIAjtjjBQuw8li1JXfacNC+R0cPPsQ0BkWFIlSpW8nDCu0AFZ9ejfJmQ9aqtgfeCoc1s2NH3vQorsvI=
72+
file: shapely.zip
73+
on:
74+
branch: master
75+
repo: puikinsh/shapely

inc/extras.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function shapely_search_form( $form ) {
282282
$form = '<form role="search" method="get" id="searchform" class="search-form" action="' . esc_url( home_url( '/' ) ) . '" >
283283
<label class="screen-reader-text" for="s">' . esc_html__( 'Search for:', 'shapely' ) . '</label>
284284
<input type="text" placeholder="' . esc_html__( 'Type Here', 'shapely' ) . '" type="text" value="' . esc_attr( get_search_query() ) . '" name="s" id="s" />
285-
<button type="submit" class="searchsubmit"><i class="fa fa-search" aria-hidden="true"></i><span class="screen-reader-text">' . esc_attr__( 'Search', 'submit button', 'shapely' ) . '</span></button>
285+
<button type="submit" class="searchsubmit"><i class="fa fa-search" aria-hidden="true"></i><span class="screen-reader-text">' . esc_attr__( 'Search', 'shapely' ) . '</span></button>
286286
</form>';
287287

288288
return $form;

0 commit comments

Comments
 (0)