Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues and instructions #711

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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.
Loading