Add release helper script (#64)

This commit adds a release helper script, amongst other workflow improvements.

See `README.md` for instructions, and `_tools/release.sh` for the script itself.

This script:

1. sanity-checks the various version tags;
2. triggers a Plugin build;
3. flags the new version as pre-release;
4. tags the version in Git;
5. creates a local working copy of the SVN repo;
6. copies the new release to the local `trunk/` (whilst keeping the ‘Stable Tag’ field in `readme.txt` pointing to the previous stable version);
7. copies the commit message from the changelog in `readme.txt`; and
8. (if a flag is set) commits the changes to the remote `trunk/`.

Pushing out a new release must still be done manually, once `trunk/` is tested and working. To do so, check out a local copy of `trunk/` and:

1. update the ‘Stable Tag’ field in `trunk/readme.txt` to the new version;
2. update the ‘Version’ field in the comment header of `trunk/footnotes.php` to the new version;
3. remove the ‘p’ from the end of the ‘version’ tag in the `getInfo()` function at the bottom of `js/wsiwyg-editor.js`; 
4. copy a new tag for the release from `trunk/` (`svn cp trunk tags/<version number>`); and
5. commit your changes (`svn ci -m "Release version <version number>"`).

The WP Plugin Directory will automatically parse the ‘Stable Tag’ field in `trunk/readme.txt`, and inform users that a new version is available.

At various stages user input is required to validate information. This is not ready for automation with GitHub Actions, but is a useful step on the way — see [this piece](https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/) for more info.

Unless a `-c` flag is passed (e.g., by running `composer run release:commit`) no changes will take place on the remote SVN repo. If you want to test this out on a branch other than `main`, uncomment lines 31 & 52 of the script.

Version checking enforces the versioning rules stated [here](https://github.com/markcheret/footnotes/wiki/Versioning).

**NB: I have not tested the `-c` mode yet, as I wanted people will more familiarity with the SVN to have a look at it before I risked making any changes and blowing everything up.**

Co-authored-by: pewgeuges <73141620+pewgeuges@users.noreply.github.com>
This commit is contained in:
Ben Goldsworthy 2021-03-17 17:46:21 +00:00 committed by GitHub
parent 0a83796cdc
commit 0a34e96450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 5310 additions and 77 deletions

1
.gitignore vendored
View file

@ -1,6 +1,7 @@
.phpdoc/
vendor/
dist/
tmp/
*.bak
authors.txt

View file

@ -4,7 +4,7 @@
## Description
Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) --- cheers for the review, folks!
Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/) cheers for the review, folks!
**footnotes** aims to be the all-in-one solution for displaying an automatically generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes are being displayed.
@ -14,21 +14,19 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor
1. Read the contributing guidelines
1. Clone this repository (`git clone git@github.com:markcheret/footnotes.git`)
- We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your development environment
- We recommend that you use [VVV](https://varyingvagrantvagrants.org/) for your local testing environment
1. Install [Composer](https://getcomposer.org/download/), if you don't have it already
1. Install dependencies (`composer install`)
1. Create a new branch from `main` (`git checkout -b <your-descriptive-branch-name>`)
1. When you're finished, commit your changes to the remote version of your branch
and submit a [pull request](https://github.com/markcheret/footnotes/pulls).
- You will have to install `php-mbstring` manually if you do not already have it.
## Checking WP Coding Standard Compliance
## Code Formatting
1. Run PHP_CodeSniffer on the file(s) you want to check (`./vendor/bin/phpcs --standard="WordPress" --colors --encoding=utf-8 -n -p <file(s)>`)
1. (If applicable) run the PHP Code Beautifier and Formatter to attempt to automatically fix any errors (`./vendor/bin/phpcbf --standard="WordPress" --encoding=utf-8 -p <file(s)>`)
- Add the `-n` flag to ignore warnings (i.e., show only errors)
- Add the `-s` flag to show sniff codes (used for disabling errors in the code with `phpcs disable:<sniff code>` — MAKE SURE THAT YOU HAVE `phpcs enable` AT THE EARLIEST POINT POSSIBLE, and provide a justification for disabling the sniff code)
- You can run either across the entire project by adding the argument `--ignore=*/vendor/*` and targetting the file `./**/*.php`
- You may have to enable double-wildcards in your console first (`shopt -s globstar`)
1. Run `composer run lint-php` to lint all PHP files
1. Run `composer run lint-php:fix` to attempt to automatically fix errors and warnings
## Releasing
1. Run `composer run release`
## Building
@ -44,8 +42,7 @@ Featured on [wpmudev](http://premium.wpmudev.org/blog/12-surprisingly-useful-wor
## Updating Documentation
1. Install [phpDocumentor](https://phpdoc.org/)
1. Run it (`phpDocumentor -d . -t docs`)
1. Run `composer run docs`
## Testing
@ -66,8 +63,8 @@ Unit tests are TODO.
These are a few examples of possible ways to delimit footnotes:
1. Your awesome text((with an awesome footnote))
2. Your awesome text[ref]with an awesome footnote[/ref]
1. Your awesome text`((`with an awesome footnote`))`
2. Your awesome text`[ref]`with an awesome footnote`[/ref]`
3. Your awesome text`<fn>`with an awesome footnote`</fn>`
4. Your awesome text`custom-shortcode`with an awesome footnote`custom-shortcode`

View file

@ -14,7 +14,8 @@ echo "Running $(dirname "$0")/build-stylesheets.sh"
if [[ $1 == "-c" ]]; then
echo "Concatenating files and placing in \`css/tmp/\`."
echo "Concatenating files and placing in \`css/tmp/\`..."
mkdir -p ./css/tmp
cat ./css/dev-common.css > ./css/tmp/footnotes-nottbrpl0.css
cat ./css/dev-{common,layout-reference-container}.css > ./css/tmp/footnotes-nottbrpl1.css
@ -29,7 +30,9 @@ if [[ $1 == "-c" ]]; then
cat ./css/dev-{common,tooltips,tooltips-alternative,layout-entry-content}.css > ./css/tmp/footnotes-alttbrpl2.css
cat ./css/dev-{common,tooltips,tooltips-alternative,layout-main-content}.css > ./css/tmp/footnotes-alttbrpl3.css
cat ./css/settings.css > ./css/tmp/settings.css
echo "Done."
echo "Stylesheet concatenation complete."
exit 0
elif [[ $1 == "-m" ]]; then
@ -39,30 +42,39 @@ elif [[ $1 == "-m" ]]; then
# `rmdir`, which will throw us an error if we have any minified files that
# haven't been moved over to `dist/css/` for whatever reason. As it currently
# stands, we have no error checking in place.
echo "Minifying files (TODO)..."
mkdir -p ./dist/css
for f in ./css/tmp/*.css; do
filename=$(basename $f .css)
echo $filename
# TODO: automated minification
echo $filename Done
done
echo "Done."
echo "Please minify the stylesheets in \`css/tmp/\`, saving them in the same location with the \`.min.css\` file extension."
read -p "Are you ready to continue? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1
exit 0
elif [[ $1 == "-d" ]]; then
echo "Deploying minified files to \`dist/css/\`..."
# NOTE: I've temporarily replaced the `mv` command
# with `cp` and disabled the `rm` command, so the minified
# files won't be removed from the source directory.
echo "Deploying minified stylesheets to \`dist/css/\`..."
rm -r ./dist
mkdir -p ./dist/css
for f in ./css/tmp/*.min.css; do
filename=$(basename $f .css)
echo Moving $filename
mv $f ./dist/css
echo $filename Moved
cp $f ./dist/css
#mv $f ./dist/css
echo -e '\t' $filename".css moved."
done
echo "Deleting temporary files..."
rm -r ./css/tmp
echo "Done."
# NB: We currently distribute both the minified + concatenated and the
# unminified + unconcatenated stylesheets with the Plugin.
echo "Deploying development stylesheets to \`dist/css/\`..."
for f in ./css/dev-*.css; do
filename=$(basename $f .css)
cp $f ./dist/css
#mv $f ./dist/css
echo -e '\t' $filename".css moved."
done
#echo "Deleting temporary files..."
#rm -r ./css/tmp
echo "All stylesheets added to build."
exit 0
else

View file

@ -1,9 +1,31 @@
#!/bin/sh
#!/bin/bash
# Moves everything except the stylesheets over to `dist/`
echo "Building Plugin..."
# Moves everything including the style sheets over to `dist/`
echo "Copying directories..."
cp -r -t dist class/ css/ js/ languages/ templates/
# Among the images, only 2 out of 3 are distributed.
echo "Copying the needed images..."
mkdir dist/img
cp -t dist/img img/fn-wysiwyg.png img/main-menu.png
echo "Copying files..."
cp -t dist features.txt license.txt readme.txt includes.php wpml-config.xml customized-documentation-schema.txt customized-template-stack.txt CONTRIBUTING.md README.md SECURITY.md
echo "Setting production flag..."
sed "s/'C_BOOL_CSS_PRODUCTION_MODE', false/'C_BOOL_CSS_PRODUCTION_MODE', true/g" footnotes.php > dist/footnotes.php
echo "Production flag set."
cp -r -t dist class/ js/ img/ languages/ templates/
cp -t dist features.txt license.txt readme.txt footnotes.php includes.php wpml-config.xml customized-documentation-schema.txt customized-template-stack.txt CONTRIBUTING.md README.md SECURITY.md
# TODO: once automatic minification is implemented, this should handle that.
# For now, we shall have to assume that this command is being run on a repo. with
# minimised stylesheet files already in `dist/css/`.
echo "Building stylesheets..."
./_tools/build-stylesheets.sh -c
if [ $? != 0 ]; then echo "Concatenation failed!"; exit 1; fi
./_tools/build-stylesheets.sh -m
if [ $? != 0 ]; then echo "Minification failed!"; exit 1; fi
./_tools/build-stylesheets.sh -d
if [ $? != 0 ]; then echo "Deployment failed!"; exit 1; fi
echo "Stylesheet build complete."
echo "Build complete."
exit 0

246
_tools/release.sh Executable file
View file

@ -0,0 +1,246 @@
#!/bin/bash
# This is a release helper script aimed at walking maintainers through the
# process of issuing new releases of the Plugin, both to reduce the risk of
# procedural errors and to provide a framework for future incremental
# automation.
#
# Step 1: Ensure the local copy has checked out the `main` branch
# Step 2: Ensure local copy of `main` is up-to-date with remote
# Step 3: Check versioning
# Step 3(a): Get all version declarations
# Step 3(b): Check that all version declarations exists
# Step 3(c)(1): Check that all development versions match
# Step 3(c)(2): Check that all stable versions match
# Step 3(d): Check that the development version is correctly flagged as such
# Step 3(e): Check that the 'Stable Tag' field is set to a stable version
# Step 3(f): Check that the 'Stable Tag' field points to a real tag on the SVN repo.
# Step 3(g): Check that the changelog is up-to-date
# Step 4: Build the Plugin
# Step 5: Update the version to pre-release
# Step 6: Tag the release
echo "Welcome to the footnotes release helper!"
echo "========================================"
if [[ $1 == "-c" ]]; then
read -p "You have passed the \`commit\` flag (\`-c\`). Did you mean to do this? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1
fi
# NB: To run on a branch other than `main`, uncomment this line:
#if false; then
# Step 1: Ensure the local copy has checked out the `main` branch
if [[ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]]; then
echo "ERR: You are not on the \`main\` branch, please check it out and re-run this command."
exit 1
else
echo "- \`main\` branch is checked out."
fi
# Step 2: Ensure local copy of `main` is up-to-date with remote
if [[ "$(git status | grep -c 'Your branch is up to date')" != 1 ]]; then
echo "ERR: Your local copy is not up-to-date with the remote, please update it and re-run this command."
exit 1
else
echo "- Local copy of \`main\` is up-to-date with remote."
fi
# NB: To run on a branch other than `main`, uncomment this line:
#fi
# Step 3: Check versioning
# Step 3(a): Get all version declarations
# NOTE: I'm not sure why, but if you try to get the root header
# version without piping it through the second `grep` command,
# you'll end up with a list of files before the version
# declaration.
echo "- Checking versions..."
STABLE_TAG="$(grep "Stable Tag:" readme.txt)"
ROOT_HEADER_VERSION="$(grep " Version:" footnotes.php | grep -Po " Version: \d+\.\d+(\.\d+)?[a-z]?$")"
JS_VERSION="$(grep "version :" js/wysiwyg-editor.js)"
# Step 3(b): Check that all version declarations exists
if [[ -z $STABLE_TAG ]]; then
echo "ERR: No 'Stable Tag' field found in \`readme.txt\`!"
exit 1
else echo "- 'Stable Tag' field set in \`readme.txt\`."
fi
if [[ -z $ROOT_HEADER_VERSION ]]; then
echo "ERR: No 'Version' field found in \`footnotes.php\` file header!"
exit 1
else echo "- 'Version' field set in \`footnotes.php\` file header."
fi
if [[ -z $JS_VERSION ]]; then
echo "ERR: No \`version\` variable found in \`js/wysiwyg-editor.js\`!"
exit 1
else echo "- \`version\` variable set in \`js/wysiwyg-editor.js\`."
fi
# Step 3(c)(1): Check that all development versions match
# NB: This doesn't currently do anything as there is only one place where the
# development version is listed.
if [[ "$(echo $JS_VERSION | grep -Poc '\d+\.\d+(\.\d+)?')" != 1 ]]; then
echo "ERR: Development version mismatch!"
echo -e "The following versions were found:\n"
echo -e '\t' $JS_VERSION '\n'
echo "Please ensure that all development versions match and re-run this command."
exit 1
else echo "- Development versions match."
fi
# Step 3(c)(2): Check that all stable versions match
if [[ "$(echo $ROOT_HEADER_VERSION $STABLE_TAG | grep -Poc '\d+\.\d+(\.\d+)?')" != 1 ]]; then
echo "ERR: Stable version mismatch!"
echo -e "The following versions were found:\n"
echo -e '\t' $ROOT_HEADER_VERSION
echo -e '\t' $STABLE_TAG '\n'
echo "Please ensure that all stable versions match and re-run this command."
exit 1
else echo "- Stable versions match."
fi
# Step 3(d): Check that the development version is correctly flagged as such
if [[ "$(echo $JS_VERSION | grep -Poc '\d+d')" != 1 ]]; then
echo "ERR: Development version flag not set!"
echo -e "The following version was found:\n"
echo -e '\t' $JS_VERSION '\n'
echo "Please ensure that the development flag ('d') is set and re-run this command."
exit 1
else echo "- Development version flag is set."
fi
DEVELOPMENT_VERSION="$(echo $JS_VERSION | grep -Po '\d+\.\d+(\.\d+)?')"
echo -e "- Development version:" $DEVELOPMENT_VERSION
# Step 3(e): Check that the 'Stable Tag' field is set to a stable version
if [[ "$(echo $STABLE_TAG | grep -Poc '\d+\.\d+(\.\d+)?$')" != 1 ]]; then
echo "ERR: 'Stable Tag' not set to a stable version!"
echo -e "The 'Stable Tag' field is set to the following:\n"
echo -e '\t' $STABLE_TAG '\n'
echo "Please ensure that the 'Stable Tag' field is set to a stable version and re-run this command."
exit 1
else echo "- 'Stable Tag' field set to stable version."
fi
STABLE_VERSION="$(echo $STABLE_TAG | grep -Po '\d+\.\d+(\.\d+)?$')"
echo "- Stable version:" $STABLE_VERSION
# Step 3(f): Check that the 'Stable Tag' field points to a real tag on the SVN repo.
echo "- Checking stable tag exists..."
git svn tag --dry-run $STABLE_VERSION &>/dev/null
if [ $? -ne 1 ]; then
echo "ERR: 'Stable Tag' does not point to an existing tag!"
echo "Please ensure that the 'Stable Tag' field points to an existing stable version and re-run this command."
exit 1
else echo "- 'Stable Tag' field is set to existing tag."
fi
# Step 3(g): Check that the changelog is up-to-date
CHANGELOG_LATEST="$(awk -e '/== Changelog ==/,/= [0-9]+\.[0-9]+(\.[0-9]+)? =/' readme.txt | grep -Po '\d+\.\d+(\.\d+)?')"
if [[ $CHANGELOG_LATEST != $DEVELOPMENT_VERSION ]]; then
echo "ERR: Changelog is not up-to-date!"
echo "Current version is $DEVELOPMENT_VERSION"
echo "Latest version in changelog is $CHANGELOG_LATEST"
echo "Please ensure that the changelog is up-to-date and re-run this command."
exit 1
else echo "- Changelog is up-to-date."
fi
echo -e "- Version check complete.\n"
# Step 4: Build the Plugin
echo "- Building Plugin..."
composer run build
if [ $? != 0 ]; then echo "Build failed!"; exit 1; fi
echo -e "- Build complete.\n"
# Step 5: Update the version to pre-release
echo "- Setting pre-release version flags..."
PRERELEASE_VERSION=$DEVELOPMENT_VERSION'p'
sed -i "s/$JS_VERSION/version : \"$PRERELEASE_VERSION\"/g" dist/js/wysiwyg-editor.js
echo "- Pre-release flags set."
# Step 6: Tag the release
echo "- Tagging release..."
git tag -a $DEVELOPMENT_VERSION -m "Pre-release of version $DEVELOPMENT_VERSION"
git push --tags
echo "- Release tagged."
# Step 7: Push release to SVN repo.
# Step 7(a): Create a new local copy of the SVN repo.
echo -e "\nThe helper will now guide you through the steps to push the new release to the WordPress Plugin Directory SVN repository."
echo "For the time being, this part of the process shall remain (mostly) manual."
read -p "Are you ready to continue? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1
echo "Creating local copy of SVN repo..."
svn checkout https://plugins.svn.wordpress.org/footnotes tmp --depth immediates
svn update --quiet tmp/trunk --set-depth infinity
svn update --quiet tmp/tags/$PRERELEASE_VERSION --set-depth infinity
echo -e "Local copy created.\n"
# Step 7(b): Update `trunk/`
echo -e "Copying files from \`dist/\` to SVN \`trunk/\`...\n"
rsync -avhic dist/ tmp/trunk/ --delete | grep -v "^\."
read -p "Does the above list of changes look correct? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1
echo -e "Copying complete.\n"
# Step 7(c): Set a release message
echo "Getting commit message from changelog..."
CHANGELOG_MESSAGE="$(awk -e "/= $DEVELOPMENT_VERSION =/,/= $STABLE_VERSION =/" readme.txt | grep '^-')"
echo -e "The changelog message for this version is:\n"
echo -e "$CHANGELOG_MESSAGE\n"
read -p "Is this correct? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1
echo -e "Commit message set.\n"
# Step 7(d): Review
clear
echo "Let's review before pushing to the SVN..."
echo -e "Here is my current state:\n"
echo "Current version:"
echo -e '\t' $PRERELEASE_VERSION
echo "Stable version:"
echo -e '\t' $STABLE_VERSION '\n'
echo "Commit message:\n"
echo -e "$CHANGELOG_MESSAGE" '\n'
echo -e "Changes made to local \`trunk/\`:\n"
svn stat tmp/trunk/
echo ""
echo -e "\`readme.txt\` header:\n"
head tmp/trunk/readme.txt
echo ""
read -p "Is this all correct? (Y/N): " CONFIRM && [[ $CONFIRM == [yY] || $CONFIRM == [yY][eE][sS] ]] || exit 1
# Step 7(d): Push to remote `trunk/` (provided the flag is set)
if [[ $1 == "-c" ]]; then
svn ci -m "$CHANGELOG_MESSAGE"
else echo "- Commit flag not set, skipping commit step."
fi
# Step 8: Cleanup
rm -rf {dist/,tmp/}

View file

@ -213,11 +213,29 @@ abstract class MCI_Footnotes_Layout_Engine {
*/
if ( C_BOOL_CSS_PRODUCTION_MODE === true ) {
wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_PACKAGE_VERSION );
wp_register_style(
'mci-footnotes-admin',
plugins_url( 'footnotes/css/settings.min.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/settings.min.css'
)
);
} else {
wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_PACKAGE_VERSION );
wp_register_style(
'mci-footnotes-admin',
plugins_url( 'footnotes/css/settings.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/settings.css'
)
);
}

View file

@ -304,9 +304,6 @@ class MCI_Footnotes {
* @since 2.0.3 add versioning of public.css for cache busting.
* @date 2020-10-29T1413+0100
* Plugin version number is needed for busting browser caches after each plugin update.
* @since 2.1.4 automate passing version number for cache busting.
* @date 2020-11-30T0646+0100
* The constant C_STR_PACKAGE_VERSION is defined at start of footnotes.php.
*
* The media scope argument 'all' is the default.
* No need to use '-css' in the handle, as this is appended automatically.
@ -350,7 +347,11 @@ class MCI_Footnotes {
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css'
),
array(),
C_STR_PACKAGE_VERSION,
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/footnotes-' . $l_str_tooltip_mode_short . 'ttbrpl' . $l_str_layout_mode . '.min.css'
),
'all'
);
@ -364,9 +365,36 @@ class MCI_Footnotes {
*
* This optional layout fix is useful by lack of layout support.
*/
wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_PACKAGE_VERSION );
wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_PACKAGE_VERSION );
wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_PACKAGE_VERSION );
wp_enqueue_style(
'mci-footnotes-common',
plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/dev-common.css'
)
);
wp_enqueue_style(
'mci-footnotes-tooltips',
plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/dev-tooltips.css'
)
);
wp_enqueue_style(
'mci-footnotes-alternative',
plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ),
array(),
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/dev-tooltips-alternative.css'
)
);
$l_str_page_layout_option = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT );
if ( 'none' !== $l_str_page_layout_option ) {
@ -376,7 +404,11 @@ class MCI_Footnotes {
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_page_layout_option . '.css'
),
array(),
C_STR_PACKAGE_VERSION,
filemtime(
plugin_dir_path(
dirname( __FILE__ )
) . 'css/dev-layout-' . $l_str_page_layout_option . '.css'
),
'all'
);
}

View file

@ -3,11 +3,19 @@
"description": "footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your WordPress Page or Post.",
"license": "GPL-3.0-or-later",
"scripts": {
"release": "./_tools/release.sh",
"release:commit": "composer run release -- -c",
"build": "./_tools/build.sh",
"lint-php": "./vendor/bin/phpcs --standard='WordPress' --colors --encoding=utf-8 -n -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php",
"lint-php:fix": "./vendor/bin/phpcbf --standard='WordPress' --encoding=utf-8 -p --ignore=*/vendor/* ./*.php ./*/*.php ./*/*/*.php",
"lint-css": "echo TODO",
"lint-js": "echo TODO",
"docs": "./vendor/bin/phpdoc -d . -t ./docs --ignore vendor/",
"post-install-cmd": "./_tools/setup.sh"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"wp-coding-standards/wpcs": "^2.3"
"wp-coding-standards/wpcs": "^2.3",
"phpdocumentor/phpdocumentor": "^3.0"
}
}

4917
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,7 @@
* Plugin URI: https://wordpress.org/plugins/footnotes/
* Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
* Author: Mark Cheret
* Package V.: 2.5.11d2
* Version: 2.5.10
* CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION.
* Author URI: https://cheret.org/footnotes/
* Text Domain: footnotes
* Domain Path: /languages
@ -15,19 +13,6 @@
* @copyright 2021 Mark Cheret (email: mark@cheret.de)
*/
/**
* Package Version number for stylesheet cache busting.
*
* Please keep this constant in sync with the Package Version in the header above
* and in the header of the readme, but not necessarily with the other Version.
*
* @since 2.1.4
* @since 2.5.3 (Hungarian)
* @var str
* @lastmodified 2021-03-11T2202+0100
*/
define( 'C_STR_PACKAGE_VERSION', '2.5.11d2' );
/**
* Version numbers in WordPress plugin readme.txt and main PHP headers.
*
@ -145,4 +130,4 @@ $g_obj_mci_footnotes->run();
* Developing stylesheets is meant to be easier when this is set to false.
* WARNING: This facility designed for development must NOT be used in production.
*/
define( 'C_BOOL_CSS_PRODUCTION_MODE', true );
define( 'C_BOOL_CSS_PRODUCTION_MODE', false );

View file

@ -69,7 +69,7 @@
author : 'Mark Cheret',
authorurl : 'https://cheret.org/footnotes/',
infourl : 'https://wordpress.org/plugins/footnotes/',
version : "2.5.10"
version : "2.5.11d"
};
}
});

View file

@ -4,10 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
Requires at least: 3.9
Tested up to: 5.7
Requires PHP: 5.6
Package Version: 2.5.11d2
Version: 2.5.10
Stable Tag: 2.5.10
CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION.
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
@ -81,14 +78,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.5.11 =
- Adding: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this is (unexpectedly) parsed for release configuration.
- Adding: Documentation: Readme.txt: informative 'Version' field pointing a tag folder in SVN for bugfix versions available ahead of the stable tag.
- Adding: Documentation: Readme.txt: informative 'Package Version' field in sync with the package version currently hidden in the main PHP script header.
- Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution during the codebase conformance overhaul.
- Update: Documentation: Readme.txt: comment line below the 'Stable Tag' field to warn that this field is (unintuitively) parsed for release configuration.
- Update: Documentation: Readme.txt: informative 'Version' field in sync with 'Version' in 'footnotes.php' for bugfix versions available ahead of the Stable Tag.
- Update: Documentation: Readme.txt: informative 'Package Version' field in sync with the 'Package V.' field added in the 'footnotes.php' file header.
- Bugfix: Dashboard: debug text input fields by disabling quotation mark escapement, thanks to @rumperuu code contribution in the standards compliance overhaul.
- Update: Codebase: make all PHP code comply to WordPress Coding Standards requirements, thanks to @rumperuu code contribution and refactoring.
- Adding: Documentation: additional readme in markdown format 'README.md' for use with GitHub, thanks to @rumperuu code contribution.
- Adding: Documentation: help and support for contributors by the means of Contributing Guidelines 'CONTRIBUTING.md', thanks to @rumperuu code contribution.
- Adding: Development: pre-commit hook for WordPress projects, modified from @bjornjohansen, thanks to @rumperuu code contribution.
- Update: Documentation: help and support for contributors by the means of Contributing Guidelines in 'CONTRIBUTING.md', thanks to @rumperuu code contribution.
- Update: Documentation: additional readme in markdown format 'README.md' for use with the code repository on GitHub, thanks to @rumperuu code contribution.
- Update: Documentation: move 'customized-template-stack.txt' and 'customized-documentation-schema.txt' from the 'development/' folder to root.
= 2.5.10 =
- Bugfix: Codebase: revert to 2.5.8 with apologies (below), thanks to @little-shiva @watershare @adjayabdg @staho @frav8 @voregnev @dsl225 @alexclassroom @a223123131 @codldmac bug reports.