diff --git a/README.md b/README.md index d403ebe..830a51b 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,7 @@ To change `css` styling, edit `scss/style.scss`, which will auto-compile if `npm 1. Document changes in [`CHANGELOG.md`](CHANGELOG.md). -2. Increment version number in `scss/style.scss` header (and auto-compile a new `style.css`) using [semantic versioning](http://semver.org/). - -3. Increment the package version number and tag the commit using `npm version`: +2. Increment the package version number and tag the commit using `npm version`: ```sh npm version major # 1.3.2 -> 2.0.0 npm version minor # 1.3.2 -> 1.4.0 @@ -56,14 +54,14 @@ To change `css` styling, edit `scss/style.scss`, which will auto-compile if `npm npm version patch -m "Release %s. Closes #39." ``` -4. Push your changes including the newly created tag: +3. Push your changes including the newly created tag: ```sh git push --follow-tags ``` After you have pushed your tag, Travis CI will build `hgnm-2014.zip` and attach it to the GitHub release. This archive is used by automatic theme updates in WordPress. -5. Copy the changes listed in `CHANGELOG.md` to the release notes on GitHub. +4. Copy the changes listed in `CHANGELOG.md` to the release notes on GitHub. ## Architecture diff --git a/package-lock.json b/package-lock.json index 7c50c39..39a668c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,16 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@masonite/wp-project-version-sync": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@masonite/wp-project-version-sync/-/wp-project-version-sync-1.0.12.tgz", + "integrity": "sha512-pUqkPAw0hOtdXABGhS+TbJ9hmzIfy1ufGzTb2CEryGPBNFuUD+xllTgg/cxc+01327l4FhR3QXDiAot/W+proQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "commander": "^2.16.0" + } + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", diff --git a/package.json b/package.json index dcaf677..1bf6146 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Repository for WordPress theme development for hgnm.org", "scripts": { "test": "sass-lint", + "version": "wp-update-project-version -p scss/style.scss && git add scss/style.scss", "start": "npm run css:watch", "build": "npm run test && npm run css:build && npm run copy && npm run zip && npm run clean", "css:build": "node-sass --include-path scss --output-style compressed scss/style.scss style.css", @@ -26,6 +27,7 @@ }, "homepage": "https://github.com/HGNM/hgnm-2014#readme", "devDependencies": { + "@masonite/wp-project-version-sync": "^1.0.12", "autoprefixer": "^9.3.1", "bestzip": "^2.1.2", "cpy-cli": "git+https://github.com/chimon2000/cpy-cli.git",