Skip to content
This repository was archived by the owner on Feb 21, 2024. It is now read-only.

Commit 06ce066

Browse files
authored
chore: v0.0.2 (#163)
1 parent 5dc1389 commit 06ce066

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

brick/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 0.0.2
2+
3+
- build(deps-dev): bump @tsconfig/docusaurus in /src/very_good_docs_site ([#135](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/135))
4+
- chore: generate template ([#136](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/136))
5+
- build(deps): bump @docusaurus/core in /src/very_good_docs_site ([#140](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/140))
6+
- build(deps): bump @docusaurus/preset-classic in /src/very_good_docs_site ([#137](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/137))
7+
- build(deps): bump actions/setup-node from 3 to 4 ([#145](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/145))
8+
- chore: request code ownership ([#147](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/147))
9+
- feat: update to docusaurs 3.0 ([#152](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/152))
10+
- refactor: remove generator script ([#162](https://github.com/VeryGoodOpenSource/very_good_docs_site/pull/162))
11+
112
# 0.0.1+7
213

314
- build(deps): various dependency updates

brick/brick.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: very_good_docs_site
22
description: A Very Good documentation site created by Very Good Ventures.
33
repository: https://github.com/VeryGoodOpenSource/very_good_docs_site
4-
version: 0.0.1+7
4+
version: 0.0.2
55

66
environment:
77
mason: ">=0.1.0-dev.50 <0.1.0"

tool/release_ready.sh

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Ensures that the package or brick is ready for a release.
2+
#
3+
# Set it up for a new version:
4+
# `./release_ready.sh <version>
5+
6+
# Check if current directory is usable for this script, if so we assume it is correctly set up.
7+
if [ ! -f "brick/brick.yaml" ]; then
8+
echo "$(pwd) is not a valid brick."
9+
exit 1
10+
fi
11+
12+
currentBranch=$(git symbolic-ref --short -q HEAD)
13+
if [[ ! $currentBranch == "main" ]]; then
14+
echo "Releasing is only supported on the main branch."
15+
exit 1
16+
fi
17+
18+
# Get information
19+
old_version=""
20+
current_name=""
21+
if [ -f "brick/brick.yaml" ]; then
22+
old_version=$(cat brick/brick.yaml | pcregrep 'version: (.*?)' | tr " " "\n" | tail -1)
23+
current_name=$(cat brick/brick.yaml | pcregrep 'name: (.*?)' | tr " " "\n" | tail -1)
24+
fi
25+
26+
if [ -z "$old_version" ] || [ -z "$current_name" ]; then
27+
echo "Current version or name was not resolved."
28+
exit 1
29+
fi
30+
31+
# Get new version
32+
new_version="$1";
33+
34+
if [[ "$new_version" == "" ]]; then
35+
echo "No new version supplied, please provide one"
36+
exit 1
37+
fi
38+
39+
if [[ "$new_version" == "$old_version" ]]; then
40+
echo "Current version is $old_version, can't update."
41+
exit 1
42+
fi
43+
44+
# Retrieving all the commits in the current directory since the last tag.
45+
previousTag="v${old_version}"
46+
raw_commits="$(git log --pretty=format:"%s" --no-merges --reverse $previousTag..HEAD -- .)"
47+
markdown_commits=$(echo "$raw_commits" | sed -En "s/\(#([0-9]+)\)/([#\1](https:\/\/github.com\/VeryGoodOpenSource\/very_good_docs_site\/pull\/\1))/p")
48+
49+
if [[ "$markdown_commits" == "" ]]; then
50+
echo "No commits since last tag, can't update."
51+
exit 0
52+
fi
53+
commits=$(echo "$markdown_commits" | sed -En "s/^/- /p")
54+
55+
echo "Updating version to $new_version"
56+
if [ -f "brick/brick.yaml" ]; then
57+
sed -i '' "s/version: $old_version/version: $new_version/g" brick/brick.yaml
58+
fi
59+
60+
if grep -q $new_version "brick/CHANGELOG.md"; then
61+
echo "CHANGELOG already contains version $new_version."
62+
exit 1
63+
fi
64+
65+
# Add a new version entry with the found commits to the brick/CHANGELOG.md.
66+
echo "# ${new_version}\n\n${commits}\n\n$(cat brick/CHANGELOG.md)" > brick/CHANGELOG.md
67+
echo "CHANGELOG for $current_name generated, validate entries here: $(pwd)/brick/CHANGELOG.md"
68+
69+
echo "Creating git branch for $current_name@$new_version"
70+
git checkout -b "chore/v$new_version" > /dev/null
71+
72+
git add brick/brick.yaml brick/CHANGELOG.md
73+
74+
echo ""
75+
echo "Run the following command if you wish to commit the changes:"
76+
echo "git commit -m \"chore: v$new_version\""

0 commit comments

Comments
 (0)