From 7d070643752a57deb92530f405b933a02124a676 Mon Sep 17 00:00:00 2001 From: Greg Ross Date: Fri, 18 Mar 2016 18:35:33 -0400 Subject: [PATCH] Update for new release script and 1.0 release. --- CHANGES.md | 4 ++ bin/release.ini | 19 ++++++ bin/release.sh | 128 ------------------------------------ gp-project-contributors.php | 4 +- readme.txt | 32 --------- 5 files changed, 25 insertions(+), 162 deletions(-) create mode 100644 bin/release.ini delete mode 100644 bin/release.sh delete mode 100644 readme.txt diff --git a/CHANGES.md b/CHANGES.md index 356fab0..ae7da84 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +## 1.0 +* Release date: March 18, 2016 +* Documentation updates and official release. + ## 0.5 * Release date: December 31, 2015 * Initial release. diff --git a/bin/release.ini b/bin/release.ini new file mode 100644 index 0000000..05529a8 --- /dev/null +++ b/bin/release.ini @@ -0,0 +1,19 @@ +[General] +plugin-slug= +temp-dir= +readme-template=bin\readme.template +changelog=CHANGES.md + +[SVN] +svn-url= +svn-username= +svn-do-not-tag= +svn-path= + +[GIT] +git-use-tag= +git-path= + +[Delete] +DeleteFiles=readme.md, CHANGES.md +DeleteDirs=bin diff --git a/bin/release.sh b/bin/release.sh deleted file mode 100644 index 29fa559..0000000 --- a/bin/release.sh +++ /dev/null @@ -1,128 +0,0 @@ -# release.sh -# -# Takes a tag to release, and syncs it to WordPress.org -# -# Notes: -# - You must pass in a valid tag to the script as the first parameter -# - You can pass an SVN user name (case sensitive) as the second parameter of the script if your SVN account is not the same as your current user id. -# - You may be prompted for your SVN password. -# - By default the plugin name used for WordPress.org is the directory name, if this is not the case, change the "PLUGIN=" line below. -# - If the tag already exists in SVN the script will exit. -# - The script will handle both added and deleted files. - -TAG=$1 -INBIN="" - -# Check to see if we're in the bin directory, if so go up one as the script assumes we're in the root of the git repo. -if [ "${PWD##*/}" == "bin" ]; then - cd .. - INBIN="/bin" -fi - -PLUGIN="${PWD##*/}" -TMPDIR=`mktemp -d` -TARFILE=`mktemp` -PLUGINDIR="$PWD" -PLUGINSVN="https://plugins.svn.wordpress.org/$PLUGIN" - -if [ "$2" != "" ]; then - SVN_OPTIONS=" --username $2" -fi - -# Fail on any error -set -e - -# Is the tag valid? -if [ -z "$TAG" ] || ! git rev-parse "$TAG" > /dev/null; then - echo "Invalid tag. Make sure you tag before trying to release." - cd "$PLUGINDIR$INBIN" - exit 1 -fi - -if [[ $VERSION == "v*" ]]; then - # Starts with an extra "v", strip for the version - VERSION=${TAG:1} -else - VERSION="$TAG" -fi - - -# Disable error trapping and then check if it already exist in SVN. -set +e - -svn info "$PLUGINSVN/tags/$VERSION" -if (( $? == 0 )); then - echo "Tag already exists in SVN!" - cd "$PLUGINDIR$INBIN" - exit 1 -fi - -set -e - -if [ -d "$TMPDIR" ]; then - # Wipe it clean - rm -rf "$TMPDIR" -fi - -# Ensure the directory exists first -mkdir "$TMPDIR" - -# Grab an unadulterated copy of SVN -svn co "$PLUGINSVN/trunk" "$TMPDIR" > /dev/null - -# Extract files from the Git tag to there -git archive --format="tar" "$TAG" > "$TARFILE" -tar -C "$TMPDIR" -xf "$TARFILE" - -# Switch to build dir -cd "$TMPDIR" - -# Run build tasks -sed -e "s/{{TAG}}/$VERSION/g" < "$PLUGINDIR/bin/readme.template" > readme.temp -sed -e "s/##\(.*\)/=\1 =/g" < "$PLUGINDIR/CHANGES.md" > changelog.temp -cat readme.temp changelog.temp > readme.txt -rm readme.temp -rm changelog.temp - -# Remove special files -rm README.md -rm CHANGES.md -rm -r "bin" - -# Disable error trapping and then check to see if there are any results, if not, don't run the svn add command as it fails. -set +e -svn status | grep -v "^.[ \t]*\..*" | grep "^?" -if (( $? == 0 )); then - set -e - svn status | grep -v "^.[ \t]*\..*" | grep "^?" | awk '{print $2}' | xargs svn add $SVN_OPTIONS -fi - -# Find any deleted files and run svn delete. -set +e -tar -df "$TARNAME" 2>&1 | grep "Not found in archive" -if (( $? == 0 )); then - set -e - tar -df "$TARNAME" 2>&1 | grep "Not found in archive" | sed -e "s/tar: \(.*\): Warning:.*/\1/g" | xargs svn delete $SVN_OPTIONS -fi - -set -e - -rm "$TARFILE" - -# Pause to allow checking -echo "About to commit $VERSION. Double-check $TMPDIR to make sure everything looks fine." -read -p "Type 'YES' in all capitals and then return to continue." - -if [[ "$REPLY" == "YES" ]]; then - - # Commit the changes - svn commit -m "Updates for $VERSION release." $SVN_OPTIONS - - # tag_ur_it - svn copy "$PLUGINSVN/trunk" "$PLUGINSVN/tags/$VERSION" -m "Tagged v$VERSION." $SVN_OPTIONS - -fi - -# Go back to where we started and clean up the temp directory. -cd "$PLUGINDIR$INBIN" -rm -rf "$TEMPDIR" \ No newline at end of file diff --git a/gp-project-contributors.php b/gp-project-contributors.php index 416a0ee..c2bff30 100644 --- a/gp-project-contributors.php +++ b/gp-project-contributors.php @@ -3,8 +3,8 @@ Plugin Name: GP Project Contributors Plugin URI: http://glot-o-matic.com/gp-project-contributors Description: Create a dynamic list of contirbutors to your GlotPress project with a WordPress shortcode. -Version: 0.5 -Author: GregRoss +Version: 1.0 +Author: Greg Ross Author URI: http://toolstack.com Tags: glotpress, glotpress plugin License: GPLv2 or later diff --git a/readme.txt b/readme.txt deleted file mode 100644 index e699fee..0000000 --- a/readme.txt +++ /dev/null @@ -1,32 +0,0 @@ -=== GP Project Contributors === -Contributors: GregRoss -Donate link: http://toolstack.com/donate -Plugin URI: http://glot-o-matic.com/gp-project-contributors -Author URI: http://toolstack.com -Tags: translation, glotpress -Requires at least: 4.4 -Tested up to: 4.4 -Stable tag: 0.5 -License: GPLv2 -License URI: http://www.gnu.org/licenses/gpl-2.0.html - -A plugin for GlotPress as a WordPress plugin that creates a formated list of contributors to a GlotPress project as a shortcode. - -== Description == - -A plugin for [GlotPress as a WordPress plugin](https://github.com/GlotPress/GlotPress-WP) that creates a formated list of contributors to a GlotPress project as a shortcode. - -== Installation == - -Install from the WordPress plugin directory. - -== Frequently Asked Questions == - -= TBD = - -TBD - -== Changelog == -= 0.5 = -* Release date: TBD -* Initial release.