diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ba1ad3..2cf49323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,6 @@ # Changelog -All notable changes to Congo will be documented in this file. - -Things that need attention when upgrading from a prior version are marked ⚠️. +All notable changes to Congo will be documented in this file. 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). @@ -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 -### Initial release 🎉 +### Added - Built with Tailwind CSS JIT for minified stylesheets without any excess code - Fully responsive layout diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 1824a91a..c5d3459b 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1,3 +1,5 @@ +/*! Congo v1.1.1 | MIT License | https://github.com/jpanther/congo */ + /*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */ /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */ diff --git a/assets/css/main.css b/assets/css/main.css index 5640ad23..9f1b67ba 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,3 +1,5 @@ +/*! Congo v1.1.1 | MIT License | https://github.com/jpanther/congo */ + @tailwind base; @tailwind components; diff --git a/package-lock.json b/package-lock.json index 440d9d0d..6f3af8fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-congo-theme", - "version": "1.0.0", + "version": "1.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "hugo-congo-theme", - "version": "1.0.0", + "version": "1.1.1", "license": "MIT", "devDependencies": { "@tailwindcss/typography": "^0.4.1", diff --git a/package.json b/package.json index 1551c337..cd4ed6fa 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "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" }, "repository": { diff --git a/release.sh b/release.sh index 53bbd406..4b5538ed 100755 --- a/release.sh +++ b/release.sh @@ -6,34 +6,63 @@ branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') # push any local changes git push -# checkout stable branch (this will catch uncommitted changes) -git checkout stable || exit 1 +# run a build to catch any uncommitted updates +npm run build # branch validation if [ $branch = "dev" ]; then - echo "Enter the release version (eg. v1.0.0):" - read version + # 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):" + read version - echo "Started releasing $version for Congo..." + echo "Started releasing Congo $version..." - # pull latest from stable - git pull + # 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 - # merge in changes from dev branch - git merge --no-ff dev -m "🔖 Release $version" + # update changelog + chan release $version || exit + npx prettier --write CHANGELOG.md - # create tag - git tag $version + # build project + npm run build - # push commit and tag to remote - git push - git push --tags + # commit version updates + git commit -a -m "🔨 Preparing release $version" + git push - echo "$version successfully released!" - echo "Returning to dev branch..." + # switch to stable branch + git checkout stable - git checkout dev + # pull latest from stable + git pull + # merge in changes from dev branch + git merge --no-ff dev -m "🔖 Release $version" + + # create tag + git tag $version + + # push commit and tag to remote + git push + git push --tags + + # publish GitHub release + timeout 2 chan gh-release $version + + echo "Congo $version successfully released! 🎉" + echo "Returning to dev branch..." + + git checkout dev + + else + echo "ERROR: There are unstaged changes in development!" + echo "Clean the working directory and try again." + fi else - echo "Releases can only be published from the dev branch!" + echo "ERROR: Releases can only be published from the dev branch!" fi