mirror of https://github.com/jpanther/congo.git
🔨 Add changelog and version updates to release.sh
parent
72b636b635
commit
0293d0652b
|
@ -1,8 +1,6 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
All notable changes to Congo will be documented in this file.
|
All notable changes to Congo will be documented in this file. Things that need attention when upgrading from a prior version are marked ⚠️.
|
||||||
|
|
||||||
Things that need attention when upgrading from a prior version are marked ⚠️.
|
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
@ -59,7 +57,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
|
||||||
## [1.0.0] - 2020-08-16
|
## [1.0.0] - 2020-08-16
|
||||||
|
|
||||||
### Initial release 🎉
|
### Added
|
||||||
|
|
||||||
- Built with Tailwind CSS JIT for minified stylesheets without any excess code
|
- Built with Tailwind CSS JIT for minified stylesheets without any excess code
|
||||||
- Fully responsive layout
|
- Fully responsive layout
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/*! Congo v1.1.1 | MIT License | https://github.com/jpanther/congo */
|
||||||
|
|
||||||
/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */
|
/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */
|
||||||
|
|
||||||
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/*! Congo v1.1.1 | MIT License | https://github.com/jpanther/congo */
|
||||||
|
|
||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "hugo-congo-theme",
|
"name": "hugo-congo-theme",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "hugo-congo-theme",
|
"name": "hugo-congo-theme",
|
||||||
"version": "1.0.0",
|
"version": "1.1.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/typography": "^0.4.1",
|
"@tailwindcss/typography": "^0.4.1",
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
|
"dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w",
|
||||||
|
"build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit",
|
||||||
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts"
|
"example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
39
release.sh
39
release.sh
|
@ -6,15 +6,37 @@ branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
|
||||||
# push any local changes
|
# push any local changes
|
||||||
git push
|
git push
|
||||||
|
|
||||||
# checkout stable branch (this will catch uncommitted changes)
|
# run a build to catch any uncommitted updates
|
||||||
git checkout stable || exit 1
|
npm run build
|
||||||
|
|
||||||
# branch validation
|
# branch validation
|
||||||
if [ $branch = "dev" ]; then
|
if [ $branch = "dev" ]; then
|
||||||
|
# check current branch is clean
|
||||||
|
if output=$(git status --porcelain) && [ -z "$output" ]; then
|
||||||
|
|
||||||
|
# get the version number
|
||||||
echo "Enter the release version (eg. v1.0.0):"
|
echo "Enter the release version (eg. v1.0.0):"
|
||||||
read version
|
read version
|
||||||
|
|
||||||
echo "Started releasing $version for Congo..."
|
echo "Started releasing Congo $version..."
|
||||||
|
|
||||||
|
# update package version
|
||||||
|
jq --arg version "$version" '.version=$version' package.json > package.tmp && mv package.tmp package.json
|
||||||
|
sed -i -e "1s/^\(\/\*! Congo \)v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1$version/" assets/css/main.css
|
||||||
|
|
||||||
|
# update changelog
|
||||||
|
chan release $version || exit
|
||||||
|
npx prettier --write CHANGELOG.md
|
||||||
|
|
||||||
|
# build project
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
# commit version updates
|
||||||
|
git commit -a -m "🔨 Preparing release $version"
|
||||||
|
git push
|
||||||
|
|
||||||
|
# switch to stable branch
|
||||||
|
git checkout stable
|
||||||
|
|
||||||
# pull latest from stable
|
# pull latest from stable
|
||||||
git pull
|
git pull
|
||||||
|
@ -29,11 +51,18 @@ if [ $branch = "dev" ]; then
|
||||||
git push
|
git push
|
||||||
git push --tags
|
git push --tags
|
||||||
|
|
||||||
echo "$version successfully released!"
|
# publish GitHub release
|
||||||
|
timeout 2 chan gh-release $version
|
||||||
|
|
||||||
|
echo "Congo $version successfully released! 🎉"
|
||||||
echo "Returning to dev branch..."
|
echo "Returning to dev branch..."
|
||||||
|
|
||||||
git checkout dev
|
git checkout dev
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "ERROR: There are unstaged changes in development!"
|
||||||
|
echo "Clean the working directory and try again."
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Releases can only be published from the dev branch!"
|
echo "ERROR: Releases can only be published from the dev branch!"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue