Last active
September 14, 2017 07:28
-
-
Save uglyrobot/e872d1a9efc122b6bae2 to your computer and use it in GitHub Desktop.
Revisions
-
uglyrobot revised this gist
Sep 22, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ fi #check that the plugin/theme version number matches what you provided. Note if multiple root php files have a "Version" header # line it will only grab the first it finds. Also if a theme and you have a php file in root with "Version" could cause mismatch. HEADERVERSION=`grep -m 1 --include={*.php,style.css} "Version" * | sed -e 's/^[ \t]*//' | awk -F' ' '{print $2}' | sed 's/[[:space:]]//g'` if [ "$VERSION" != "$HEADERVERSION" ]; then echo "Version doesn't match the plugin/theme header. Exiting...."; exit 2; fi #get the changelog message -
uglyrobot revised this gist
Jun 19, 2014 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,19 +8,20 @@ fi if [[ -z "$VERSION" ]] ; then echo "Sorry, I need a version number!" exit 1 fi #check that the plugin/theme version number matches what you provided. Note if multiple root php files have a "Version" header # line it will only grab the first it finds. Also if a theme and you have a php file in root with "Version" could cause mismatch. HEADERVERSION=`grep -m 1 --include={*.php,style.css} "^Version" * | awk -F' ' '{print $2}' | sed 's/[[:space:]]//g'` if [ "$VERSION" != "$HEADERVERSION" ]; then echo "Version doesn't match the plugin/theme header. Exiting...."; exit 2; fi #get the changelog message echo "Enter your multiline changelog then ctrl-d on a new line when done:" MSG=$(cat) if [[ -z "$MSG" ]] ; then echo "Sorry, I need a changelog for this release!" exit 3 fi #get plugin slug/name from current directory -
uglyrobot revised this gist
Jun 14, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,13 +15,15 @@ fi HEADERVERSION=`grep -m 1 --include={*.php,style.css} "^Version" * | awk -F' ' '{print $2}' | sed 's/[[:space:]]//g'` if [ "$VERSION" != "$HEADERVERSION" ]; then echo "Version doesn't match the plugin/theme header. Exiting...."; exit 1; fi #get the changelog message echo "Enter your multiline changelog then ctrl-d on a new line when done:" MSG=$(cat) if [[ -z "$MSG" ]] ; then echo "Sorry, I need a changelog for this release!" exit 0 fi #get plugin slug/name from current directory NAME=${PWD##*/} git tag -a $VERSION -m "$MSG" -
uglyrobot revised this gist
Jun 14, 2014 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,10 @@ if [[ -z "$VERSION" ]] ; then exit 0 fi #check that the plugin/theme version number matches what you provided HEADERVERSION=`grep -m 1 --include={*.php,style.css} "^Version" * | awk -F' ' '{print $2}' | sed 's/[[:space:]]//g'` if [ "$VERSION" != "$HEADERVERSION" ]; then echo "Version doesn't match the plugin/theme header. Exiting...."; exit 1; fi echo "Enter your multiline changelog then ctrl-d on a new line when done:" MSG=$(cat) if [[ -z "$MSG" ]] ; then -
uglyrobot revised this gist
Jun 13, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if [[ -z "$VERSION" ]] ; then exit 0 fi echo "Enter your multiline changelog then ctrl-d on a new line when done:" MSG=$(cat) if [[ -z "$MSG" ]] ; then echo "Sorry, I need a changelog for this release!" -
uglyrobot renamed this gist
Jun 13, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
uglyrobot revised this gist
Jun 13, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,5 +22,5 @@ NAME=${PWD##*/} git tag -a $VERSION -m "$MSG" git push origin $VERSION git-archive-all --force-submodules --prefix $NAME/ ~/Desktop/$NAME-$VERSION.zip echo "Tagged in bitbucket and Packaged as $NAME-$VERSION.zip on your desktop." -
uglyrobot created this gist
Jun 13, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/bin/bash if [[ $# -eq 0 ]] ; then echo "Please enter a version number:" read VERSION else VERSION=$1 fi if [[ -z "$VERSION" ]] ; then echo "Sorry, I need a version number!" exit 0 fi echo "Enter your multiline changelog and ctrl-d on a new line when done:" MSG=$(cat) if [[ -z "$MSG" ]] ; then echo "Sorry, I need a changelog for this release!" exit 0 fi NAME=${PWD##*/} git tag -a $VERSION -m "$MSG" git push origin $VERSION git-archive-all --prefix $NAME/ ~/Desktop/$NAME-$VERSION.zip echo "Tagged in bitbucket and Packaged as $NAME-$VERSION.zip on your desktop."