Skip to content

Commit

Permalink
Merge pull request #711 from rage/pre-release
Browse files Browse the repository at this point in the history
Fix issues and instructions
  • Loading branch information
nygrenh committed Jan 26, 2024
2 parents 4ed1d66 + eda9344 commit fb9126e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
@@ -1,6 +1,6 @@
# Changelog

## [3.0.0]
## [3.0.0] - 2024-01-25

- Redesigned the user interface
- Fixed a bug when changing the exercise directory on Windows
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Expand Up @@ -103,13 +103,15 @@ Submit a pull request, and if it fixes problems that have an existing issues on

To release, create a release with the tag in the format `vMAJOR.MINOR.PATCH`, for example `v1.2.3`. For a pre-release version, append `-prerelease` to the tag, for example `v1.2.3-prerelease`.

A script is ran during the release process to ensure that
A script, `./bin/validateRelease.sh`, is ran during the release process to ensure that

- the `CHANGELOG.md` has an entry for the tagged version
- the `package.json` and `package-lock.json` has the same version number as the tagged version

You can update the `package-lock.json` version with `npm i --package-lock-only`.

You can run the script manually by giving the GitHub release tag you're going to use as an argument. For example `./bin/validateRelease.sh v3.0.0-prerelease`.

## Other notes

Running the extension produces the following superfluous warnings:
Expand Down
8 changes: 4 additions & 4 deletions bin/validateRelease.sh
Expand Up @@ -2,7 +2,7 @@

exitCode=0

if [[ ! $1 =~ ^[v]([0-9]+\.[0-9]+\.[0-9]+(-prerelease)?)$ ]]
if [[ ! $1 =~ ^[v]([0-9]+\.[0-9]+\.[0-9])+(-prerelease)?$ ]]
then
echo "Error: Input '${1}' did not match the format 'vX.Y.Z[-prerelease]'"
exitCode=1
Expand All @@ -13,19 +13,19 @@ tagVersion=${BASH_REMATCH[1]}
packageVersion=$(grep -Eo '^ "version": ".+$' package.json | cut -d\" -f4)
if [[ ! $packageVersion =~ $tagVersion ]]
then
echo "Error: The version in package.json '${packageVersion}' doesn't match with the tag '${tagVersion}."
echo "Error: The version in package.json '${packageVersion}' doesn't match with the tag '${tagVersion}'."
exitCode=1
fi

# Make sure that the package-lock.json version also matches
packageLockVersion=$(grep -Eo '"version":.+$' package-lock.json)
if [[ ! $packageLockVersion =~ '"version": "'$tagVersion'",' ]]
then
echo "Error: The version in package-lock.json '${packageVersion}' doesn't match with the tag '${tagVersion}."
echo "Error: The version in package-lock.json '${packageVersion}' doesn't match with the tag '${tagVersion}'."
exitCode=1
fi

# Changelog must have entry matching [X.Y.Z] - YYY-MM-DD
# Changelog must have entry matching [X.Y.Z] - YYYY-MM-DD
# Count the number of matches
changelogEntry=$(grep -Ec "\[""$tagVersion""\] - [0-9]{4}(-[0-9]{2}){2}$" CHANGELOG.md)
if [[ $changelogEntry != 1 ]]
Expand Down
2 changes: 1 addition & 1 deletion bin/verifyThatLangsBuildsExist.js
@@ -1,5 +1,5 @@
const config = require("../config");
const getAllLangsCLIs = require("../src/utils/env").getAllLangsCLIs;
const getAllLangsCLIs = require("../src/utilities/env").getAllLangsCLIs;

const TMC_LANGS_DL_URL = config.productionApi.__TMC_LANGS_DL_URL__.replace(/"/g, "");
const TMC_LANGS_VERSION = config.productionApi.__TMC_LANGS_VERSION__.replace(/"/g, "");
Expand Down
Binary file removed media/welcome_exercise_decorations.png
Binary file not shown.

0 comments on commit fb9126e

Please sign in to comment.