Skip to content

Commit a724b4e

Browse files
authored
Chore/update changelog 0.3.1 (#25)
* feat: add script to automate CHANGELOG.md updates with latest GitHub releases * feat: update .env.example with Tauri updater signing configuration
1 parent e96a1af commit a724b4e

3 files changed

Lines changed: 181 additions & 23 deletions

File tree

.env.example

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@
88
# VITE_FORCE_UPDATE_DEV_MODE=false
99

1010
# Update endpoint for testing (optional)
11-
# VITE_UPDATE_ENDPOINT=http://localhost:8080/latest.json
11+
# VITE_UPDATE_ENDPOINT=http://localhost:8080/latest.json
12+
13+
# Tauri updater signing configuration
14+
# Path to your private key for signing updates
15+
# TAURI_SIGNING_PRIVATE_KEY=/path/to/your/private.key
16+
# Password for your private key (if applicable)
17+
# TAURI_SIGNING_PRIVATE_KEY_PASSWORD='your_password_here'

CHANGELOG.md

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,54 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5-
### 0.2.1 (2025-04-17)
5+
## 0.3.1 (2025-04-20)
66

7+
### Features
8+
9+
* build(deps-dev): bump typescript from 5.6.3 to 5.8.3 by @dependabot in https://github.com/devbyray/circle-camera/pull/4
10+
* Fix/release action by @devbyray in https://github.com/devbyray/circle-camera/pull/21
11+
* Fix/release pipeline by @devbyray in https://github.com/devbyray/circle-camera/pull/22
12+
* Docs/v0.3.1 update by @devbyray in https://github.com/devbyray/circle-camera/pull/23
13+
* Feature/improve update and signing by @devbyray in https://github.com/devbyray/circle-camera/pull/24
14+
15+
**Full Changelog**: https://github.com/devbyray/circle-camera/compare/v0.3.0...v0.3.1
16+
17+
## 0.3.0 (2025-04-18)
18+
19+
### Features
20+
21+
* update download section with version 0.2.0 and new DMG link by @devbyray in https://github.com/devbyray/circle-camera/pull/9
22+
23+
* Docs/update v0.2.0 download by @devbyray in https://github.com/devbyray/circle-camera/pull/10
24+
* Devbyray/issue6 by @devbyray in https://github.com/devbyray/circle-camera/pull/14
25+
* Fix release action by @devbyray in https://github.com/devbyray/circle-camera/pull/16
26+
* Devbyray/issue15 by @devbyray in https://github.com/devbyray/circle-camera/pull/17
27+
* Fix/ts build error by @devbyray in https://github.com/devbyray/circle-camera/pull/18
28+
* Merge branch 'main' into fix/fix-build-pipeline by @devbyray in https://github.com/devbyray/circle-camera/pull/19
29+
* Fix/fix build pipeline by @devbyray in https://github.com/devbyray/circle-camera/pull/20
30+
31+
**Full Changelog**: https://github.com/devbyray/circle-camera/compare/0.2.0...v0.3.0
32+
33+
## 0.2.0-windows-pre (2025-04-14)
734

835
### Features
936

10-
* [#6](https://github.com/devbyray/circle-camera/issues/6) add .env.example for environment variable configuration and update .gitignore to include .env file ([8df4497](https://github.com/devbyray/circle-camera/commit/8df44971c15c050f6125d3c5854ff60e3a94bb80))
11-
* [#6](https://github.com/devbyray/circle-camera/issues/6) add GitHub Actions workflow for automated build and release process ([f4f1fff](https://github.com/devbyray/circle-camera/commit/f4f1fff2e1215ff31ec079d0f397f23a6662a474))
12-
* [#6](https://github.com/devbyray/circle-camera/issues/6) add update overlay component and integrate update handling in WebcamContainer ([dd57510](https://github.com/devbyray/circle-camera/commit/dd57510c819fc39f2a47011ce29038bc5add3dcb))
13-
* [#6](https://github.com/devbyray/circle-camera/issues/6) enhance UpdateChecker component with simulated update version generation and improved TypeScript typing ([ea18f34](https://github.com/devbyray/circle-camera/commit/ea18f340551b9bc0252be39f541bdf6a697415a8))
14-
* [#6](https://github.com/devbyray/circle-camera/issues/6) implemented basic update meganism with Tauri ([5e32c82](https://github.com/devbyray/circle-camera/commit/5e32c82de3674d7002ba18921ede229e68d2b84f))
15-
* add window drag functionality and close command integration ([5b47e1e](https://github.com/devbyray/circle-camera/commit/5b47e1e5b1a28cd3371b41f68cb8cdd9484eb5e4))
16-
* enhance documentation and setup instructions for Windows and MacOS; add Product Hunt links and recommendations ([d934943](https://github.com/devbyray/circle-camera/commit/d934943acf5bff6251dfb79d8f1db53a00b4d20c))
17-
* enhance GitHub Actions workflow with Rust toolchain installation and caching for PNPM ([a301773](https://github.com/devbyray/circle-camera/commit/a301773cb6b6df010d41c904d75b4812ff553191))
18-
* enhance window drag functionality and update permissions in configuration ([ee8bec2](https://github.com/devbyray/circle-camera/commit/ee8bec2dd24e707ea8a01d98220497ce65326d89))
19-
* initialize Circle Camera Tauri application with camera access ([bf3e2cf](https://github.com/devbyray/circle-camera/commit/bf3e2cfcaed5bc9bf966fc01d3a74508ceb584a4))
20-
* initialize Circle Camera Tauri application with camera functionality ([f46adb5](https://github.com/devbyray/circle-camera/commit/f46adb57e8eafeb646af097ba2394ea24e696da5))
21-
* remove Windows build steps and assets from release workflow as Windows is not officially supported ([5123e92](https://github.com/devbyray/circle-camera/commit/5123e9247a032e440eda2878967ab6505fcfcc9c))
22-
* update .gitignore to include installers directory and enhance README with installation and development instructions ([6e2c996](https://github.com/devbyray/circle-camera/commit/6e2c9965651d965be47e4fbc36b348147ff8cf85))
23-
* update download section with version 0.2.0 and new DMG link ([#9](https://github.com/devbyray/circle-camera/issues/9)) ([433bd74](https://github.com/devbyray/circle-camera/commit/433bd74afa60cf26e53cf4e48462ccbaeb0e7c85))
24-
* update license to EUPL and add Vercel analytics integration ([#1](https://github.com/devbyray/circle-camera/issues/1)) ([ce24ab0](https://github.com/devbyray/circle-camera/commit/ce24ab055054c266d6e6cf8fe0e7b693537e1052))
25-
26-
27-
### Bug Fixes
28-
29-
* [#6](https://github.com/devbyray/circle-camera/issues/6) dynamically determine development mode for update simulation ([5c9837a](https://github.com/devbyray/circle-camera/commit/5c9837ac4f057c74438f40717a14f8669ed3d54e))
30-
* correct image path in features documentation ([5ee911d](https://github.com/devbyray/circle-camera/commit/5ee911d46b75b4eb924da1eda8f7cd4990cf4f5f))
37+
* update download section with version 0.2.0 and new DMG link by @devbyray in https://github.com/devbyray/circle-camera/pull/9
38+
39+
* Docs/update v0.2.0 download by @devbyray in https://github.com/devbyray/circle-camera/pull/10
40+
41+
**Full Changelog**: https://github.com/devbyray/circle-camera/compare/0.2.0...0.2.0-windows-pre
42+
43+
## 0.2.0 (2025-04-10)
44+
45+
### Features
46+
47+
* update license to EUPL and add Vercel analytics integration by @devbyray in https://github.com/devbyray/circle-camera/pull/1
48+
49+
* Feature/2 themingbranding options by @devbyray in https://github.com/devbyray/circle-camera/pull/8
50+
51+
**Full Changelog**: https://github.com/devbyray/circle-camera/compare/0.1.0...0.2.0
52+
53+
## 0.1.0 (2025-04-07)
54+
55+
**Full Changelog**: https://github.com/devbyray/circle-camera/commits/0.1.0

scripts/update-changelog.sh

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
#!/bin/bash
2+
3+
# Script to update CHANGELOG.md with the latest GitHub releases
4+
# Usage: ./scripts/update-changelog.sh
5+
6+
set -e
7+
8+
# Repository information
9+
REPO_OWNER="devbyray"
10+
REPO_NAME="circle-camera"
11+
12+
# File paths
13+
CHANGELOG_FILE="CHANGELOG.md"
14+
TEMP_FILE="/tmp/changelog_temp.md"
15+
16+
echo "Fetching latest releases from GitHub..."
17+
18+
# Get all releases from GitHub in a more detailed format that's easier to parse
19+
LATEST_RELEASES=$(gh release list --repo ${REPO_OWNER}/${REPO_NAME} --limit 10 --json tagName,publishedAt,name,isLatest)
20+
21+
if [ $? -ne 0 ]; then
22+
echo "Error: Failed to fetch releases from GitHub. Make sure you're authenticated with 'gh auth login'."
23+
exit 1
24+
fi
25+
26+
# Create the header of the CHANGELOG
27+
cat > $TEMP_FILE << EOF
28+
# Changelog
29+
30+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
31+
32+
EOF
33+
34+
# Sort releases by publishedAt in descending order (newest first)
35+
echo "$LATEST_RELEASES" | jq 'sort_by(.publishedAt) | reverse' > /tmp/sorted_releases.json
36+
37+
# Process each release from the sorted JSON output
38+
cat /tmp/sorted_releases.json | jq -c '.[]' | while read -r release; do
39+
# Extract tag name and published date from the JSON
40+
TAG=$(echo $release | jq -r '.tagName')
41+
PUBLISHED_AT=$(echo $release | jq -r '.publishedAt')
42+
43+
# Format the date to a more readable format (YYYY-MM-DD)
44+
DATE=$(date -u -j -f "%Y-%m-%dT%H:%M:%SZ" "$PUBLISHED_AT" "+%Y-%m-%d" 2>/dev/null || echo "$PUBLISHED_AT")
45+
46+
# Extract version number without the 'v' prefix for the CHANGELOG if it exists
47+
VERSION=${TAG#v}
48+
49+
if [ -n "$TAG" ]; then
50+
echo "Processing release $VERSION (tag: $TAG) from $DATE"
51+
52+
# Write version header to temp file
53+
echo "## $VERSION ($DATE)" >> $TEMP_FILE
54+
echo -e "\n" >> $TEMP_FILE
55+
56+
# Get detailed release information including body content
57+
RELEASE_BODY=$(gh release view "$TAG" --repo ${REPO_OWNER}/${REPO_NAME} --json body -q '.body')
58+
59+
if [ $? -ne 0 ] || [ -z "$RELEASE_BODY" ] || [ "$RELEASE_BODY" == "null" ]; then
60+
echo "No release notes found for $TAG" >&2
61+
continue
62+
fi
63+
64+
# Process features section
65+
if [[ "$RELEASE_BODY" == *"### Features"* ]] || [[ "$RELEASE_BODY" == *"feat:"* ]] || [[ "$RELEASE_BODY" == *"Features"* ]]; then
66+
echo "### Features" >> $TEMP_FILE
67+
echo -e "\n" >> $TEMP_FILE
68+
69+
# Try different patterns to extract feature content
70+
if [[ "$RELEASE_BODY" == *"### Features"* ]]; then
71+
# Extract content between ### Features and the next heading
72+
FEATURES=$(echo "$RELEASE_BODY" | sed -n '/### Features/,/^###/p' | sed '1d;/^###/d')
73+
echo "$FEATURES" >> $TEMP_FILE
74+
elif [[ "$RELEASE_BODY" == *"feat:"* ]]; then
75+
# Extract lines containing feat:
76+
echo "$RELEASE_BODY" | grep -E '^\* feat:|^- feat:' | sed 's/^\* feat:/*/g' | sed 's/^- feat:/*/g' >> $TEMP_FILE
77+
fi
78+
79+
echo -e "\n" >> $TEMP_FILE
80+
fi
81+
82+
# Process bug fixes section
83+
if [[ "$RELEASE_BODY" == *"### Bug Fixes"* ]] || [[ "$RELEASE_BODY" == *"fix:"* ]] || [[ "$RELEASE_BODY" == *"Bug Fixes"* ]]; then
84+
echo "### Bug Fixes" >> $TEMP_FILE
85+
echo -e "\n" >> $TEMP_FILE
86+
87+
# Try different patterns to extract bugfix content
88+
if [[ "$RELEASE_BODY" == *"### Bug Fixes"* ]]; then
89+
# Extract content between ### Bug Fixes and the next heading
90+
BUGFIXES=$(echo "$RELEASE_BODY" | sed -n '/### Bug Fixes/,/^###/p' | sed '1d;/^###/d')
91+
echo "$BUGFIXES" >> $TEMP_FILE
92+
elif [[ "$RELEASE_BODY" == *"fix:"* ]]; then
93+
# Extract lines containing fix:
94+
echo "$RELEASE_BODY" | grep -E '^\* fix:|^- fix:' | sed 's/^\* fix:/*/g' | sed 's/^- fix:/*/g' >> $TEMP_FILE
95+
fi
96+
97+
echo -e "\n" >> $TEMP_FILE
98+
fi
99+
100+
# Check for pull requests in the body that don't already include feature or bugfix markers
101+
if [[ "$RELEASE_BODY" == *"by @"* ]]; then
102+
# Extract pull request lines that aren't already captured in Features or Bug Fixes sections
103+
PR_CONTENT=$(echo "$RELEASE_BODY" | grep "by @" | grep -v "Full Changelog" | grep -v "feat:" | grep -v "fix:")
104+
if [ -n "$PR_CONTENT" ]; then
105+
echo "$PR_CONTENT" >> $TEMP_FILE
106+
echo -e "\n" >> $TEMP_FILE
107+
fi
108+
fi
109+
110+
# Check for changelog URL
111+
if [[ "$RELEASE_BODY" == *"Full Changelog"* ]]; then
112+
# Extract the full changelog line
113+
CHANGELOG_URL=$(echo "$RELEASE_BODY" | grep "Full Changelog")
114+
echo "$CHANGELOG_URL" >> $TEMP_FILE
115+
echo -e "\n" >> $TEMP_FILE
116+
fi
117+
fi
118+
done
119+
120+
# Remove duplicate empty lines
121+
cat $TEMP_FILE | sed '/^$/N;/^\n$/D' > "${TEMP_FILE}.clean"
122+
mv "${TEMP_FILE}.clean" $TEMP_FILE
123+
124+
# Replace original CHANGELOG with new one
125+
mv $TEMP_FILE $CHANGELOG_FILE
126+
127+
echo "CHANGELOG.md has been updated with the latest releases."

0 commit comments

Comments
 (0)