https://github.com/petervanderdoes/wp-theme-hooks
This is a collection of git hooks to be used in conjunction with git-flow AVH edition. It also has some standard git hooks that were originally created by Sitebase(https://github.com/Sitebase/git-hooks). I just adjusted their code to make it work for me. These hooks are used by me for development of WordPress themes.
https://github.com/petervanderdoes/wp-theme-hooks
Last synced: about 1 month ago
JSON representation
This is a collection of git hooks to be used in conjunction with git-flow AVH edition. It also has some standard git hooks that were originally created by Sitebase(https://github.com/Sitebase/git-hooks). I just adjusted their code to make it work for me. These hooks are used by me for development of WordPress themes.
- Host: GitHub
- URL: https://github.com/petervanderdoes/wp-theme-hooks
- Owner: petervanderdoes
- License: other
- Created: 2013-07-10T01:59:21.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2015-02-16T01:43:21.000Z (over 11 years ago)
- Last Synced: 2025-01-25T10:41:13.057Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 207 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.mdown
- License: LICENSE
Awesome Lists containing this project
README
# WordPress theme development git hooks
This is a collection of git hooks to be used in conjunction with git-flow AVH
edition.
It also has some standard git hooks that were originally created by [Sitebase](https://github.com/Sitebase/git-hooks).
I just adjusted their code to make it work for me.
These hooks are used by me for development of WordPress themes.
## Installation
* Clone the repository
* Install using `make`, by default the software will be installed
in `/opt/wp-theme-hooks`.
* Copy or link the /opt/wp-theme-hooks to .git/hooks directory in your git repository
* Copy the file hooks_config.sample to the .git directory, naming it hooks_config.
* Modify the hooks_config file as needed.
## Requirements
* git-flow AVH edition
* WordPress meta information is set up as described below.
* A file called Changes.md set up as described below.
* Bash shell script.
* Use the [Semantic Versioning 2.0.0](http://semver.org/) specification for your versions.
## Information
* When you start a release you can omit the version number. The filter will grep
the version set in the stable info of the master branch and increase the patch level.
* You can't commit on a master branch.
* You can't commit files with merge markers.
* Commit messages shorter than 8 are not allowed.
## hooks_config file
* If you keep track of your version somewhere else than the style.css, you need
to make these changes in the function _update_version
## WordPress meta information
Unlike the codex describes, I use a different comment system for the meta
information.
```
/**
* Theme Name:
* Theme URI:
* Description:
* Version: 0.0.0
* Author:
* Author URI:
*/
```
You can add or remove meta information but you need to keep the Version tag,
with a space behind the colon.
## Changes.md
The Changes.md needs to contain a section for the changelog, set up as follows
```
=== Theme name
== Changelog
= Version 0.0.0
* 1st entry of changelog
```
After you added another version you can edit or remove the 0.0.0 entry
There is a template for the file in the templates directory. If the file
Changes.md doesn't exists in the root of the repository this template
will be copied there.