docs(main): Refactor Changelog generation script and update usage guide (#2884)

Signed-off-by: cuisongliu <cuisongliu@qq.com>
This commit is contained in:
cuisongliu
2023-03-30 19:15:10 +08:00
committed by GitHub
parent 5efa4b1c2d
commit 2d8d793e7e
6 changed files with 340 additions and 33 deletions
+133
View File
@@ -0,0 +1,133 @@
- [v4.2.0-alpha1](#v420-alpha1)
- [Downloads for v4.2.0-alpha1](#downloads-for-v420-alpha1)
- [Source Code](#source-code)
- [Client Binaries](#client-binaries)
- [Usage](#usage)
- [Changelog since v4.1.5](#changelog-since-v415)
# [v4.2.0-alpha1](https://github.com/labring/sealos/releases/tag/v4.2.0-alpha1)
## Downloads for v4.2.0-alpha1
### Source Code
filename |
-------- |
[v4.2.0-alpha1.tar.gz](https://github.com/labring/sealos/archive/refs/tags/v4.2.0-alpha1.tar.gz) |
### Client Binaries
filename |
-------- |
[sealos_4.2.0-alpha1_linux_amd64.tar.gz](https://github.com/labring/sealos/releases/download/v4.2.0-alpha1/sealos_4.2.0-alpha1_linux_amd64.tar.gz) |
[sealos_4.2.0-alpha1_linux_arm64.tar.gz](https://github.com/labring/sealos/releases/download/v4.2.0-alpha1/sealos_4.2.0-alpha1_linux_arm64.tar.gz) |
## Usage
amd64:
```shell
wget https://github.com/labring/sealos/releases/download/v4.2.0-alpha1/sealos_4.2.0-alpha1_linux_amd64.tar.gz && tar -zxvf sealos_4.2.0-alpha1_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
## create a cluster for sealos
sealos run labring/kubernetes:v1.24.0 labring/calico:v3.22.1 --masters 192.168.64.2,192.168.64.22,192.168.64.20 --nodes 192.168.64.21,192.168.64.19 --passwd your-own-ssh-passwd
```
arm64:
```shell
wget https://github.com/labring/sealos/releases/download/v4.2.0-alpha1/sealos_4.2.0-alpha1_linux_arm64.tar.gz && tar -zxvf sealos_4.2.0-alpha1_linux_arm64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
## create a cluster for sealos
sealos run labring/kubernetes:v1.24.0 labring/calico:v3.22.1 --masters 192.168.64.2,192.168.64.22,192.168.64.20 --nodes 192.168.64.21,192.168.64.19 --passwd your-own-ssh-passwd
```
## Changelog since v4.1.5
### What's Changed
* af1bae9b - Jiahui - Merge pull request https://github.com/labring/sealos/pull/#2794 from cuisongliu/delete_node
* 07e2bcea - cuisongliu - feature(main): delete node if failed
* ebefb194 - cuisongliu - feature(main): registry list repo fix (https://github.com/labring/sealos/pull/#2821)
* 7a89ce36 - 中弈 - update zh readme (https://github.com/labring/sealos/pull/#2819)
* 5c57670a - cuisongliu - feature(main): delete shim images dir (https://github.com/labring/sealos/pull/#2817)
* 9a419650 - fengxsong - Regenerate types (https://github.com/labring/sealos/pull/#2815)
* 044abe05 - Mihai Țimbota-Belin - fix concurrent map access in clusterClient (https://github.com/labring/sealos/pull/#2812)
* 3cd3ddc4 - zzjin - Update module (https://github.com/labring/sealos/pull/#2813)
* 45e62bae - cuisongliu - feature(main): check scp md5sum to config cmd (https://github.com/labring/sealos/pull/#2806)
* 299ef1c4 - cuisongliu - feature(main): add cri cgroup-driver (https://github.com/labring/sealos/pull/#2805)
* d3b6cdf7 - will - update offline-docs (https://github.com/labring/sealos/pull/#2804)
* 3344780c - yy - feat: add default time to image cr. (https://github.com/labring/sealos/pull/#2774)
* 60e3d636 - yy - feat: refactor auth, move dir. (https://github.com/labring/sealos/pull/#2796)
* 0bd7639e - 晓杰 - fix(account_controller.go): will lead to Repeat recharge when in recharge (https://github.com/labring/sealos/pull/#2763)
* 80c8af28 - fengxsong - refactor: support setting ssh field for each subset of hosts (https://github.com/labring/sealos/pull/#2795)
* 8512a5a8 - Jiahui - Fix println built-in function output to standard error (https://github.com/labring/sealos/pull/#2798)
* 3dffefe8 - Archer - feat: prevent refresh page from keyboard;mock app in 'dev env' (https://github.com/labring/sealos/pull/#2793)
* a22a7cf3 - Jiahui - fix `GetRootfsImage` function cause panic (https://github.com/labring/sealos/pull/#2799)
* e0399833 - zhujingyang - feat modify request header & delete infra (https://github.com/labring/sealos/pull/#2791)
* 6c8f7290 - zhujingyang - Fix iframe copy issue (https://github.com/labring/sealos/pull/#2790)
* 8ac16751 - cuisongliu - feature(main): add system config to sealos (https://github.com/labring/sealos/pull/#2792)
* 350ba2e9 - Meteorite - feat: add infra concurrent opts & optimize delete instances (https://github.com/labring/sealos/pull/#2789)
* 505c6ec0 - cuisongliu - feature(main): add compressed to registry/docker (https://github.com/labring/sealos/pull/#2786)
* e632ccbe - cuisongliu - fix(main): add CHANGELOG-4.1.7.md (https://github.com/labring/sealos/pull/#2787)
* 1521f9cc - zhujingyang - feat Obtain desktop applications through app crd (https://github.com/labring/sealos/pull/#2751)
* 52f954a9 - cuisongliu - fix(main): fix kubeadm init func (https://github.com/labring/sealos/pull/#2756)
* 5e5ac7f5 - cuisongliu - ci(main): add ci for merge (https://github.com/labring/sealos/pull/#2785)
* a22e98e6 - yy - feat: add app cr. (https://github.com/labring/sealos/pull/#2760)
* 97c45eb2 - gitccl - get ingress secret from env (https://github.com/labring/sealos/pull/#2768)
* 201f9d25 - cuisongliu - ci(main): delete rebase (https://github.com/labring/sealos/pull/#2780)
* 429acc6d - Archer - feat: desktopSDK0.1.11 (https://github.com/labring/sealos/pull/#2778)
* 25a9e54f - fengxsong - fix: share the same systemContext in build command (https://github.com/labring/sealos/pull/#2770)
* 9cf172a0 - cuisongliu - ci(main): update COLLABORATOR (https://github.com/labring/sealos/pull/#2779)
* cb2a168a - sealos-ci-robot - Merge pull request https://github.com/labring/sealos/pull/#2777 from cuisongliu/print
* 3e9987d1 - cuisongliu - ci(main): add debug.yml
* d57fc561 - sealos-ci-robot - Merge pull request https://github.com/labring/sealos/pull/#2776 from cuisongliu/print
* 9741bace - cuisongliu - ci(main): add debug.yml
* 44d10a67 - cuisongliu - ci(main): add github.event.comment.author_association (https://github.com/labring/sealos/pull/#2775)
* a31b6b8d - cuisongliu - ci(main): add labels size to .github (https://github.com/labring/sealos/pull/#2773)
* 3875a8a8 - cuisongliu - ci(main): add github.event.comment.author_association (https://github.com/labring/sealos/pull/#2772)
* 7afb70ec - cuisongliu - ci(main): replace GH_TOKEN,GITHUB_TOKEN to GH_PAT (https://github.com/labring/sealos/pull/#2771)
* 3061ca6e - cuisongliu - ci(main): add rebase (https://github.com/labring/sealos/pull/#2769)
* 16998446 - zzjin - Change terminal image to self-host hub (https://github.com/labring/sealos/pull/#2762)
* 62f88352 - cuisongliu - fix(main): delete node not exec clean.sh (https://github.com/labring/sealos/pull/#2765)
* 4e921fe2 - fengxsong - fix: avoid invoking default function before complete merging configs (https://github.com/labring/sealos/pull/#2758)
* 1d6f5f81 - zzjin - Ignore frontend changes from ci docker (https://github.com/labring/sealos/pull/#2761)
* 59c9a394 - fengxsong - feat: add diff subcommand (https://github.com/labring/sealos/pull/#2753)
* dd24d6cc - Xin He - BUG: custom certSANs should append to the default ClusterConfiguration certSANs (https://github.com/labring/sealos/pull/#2752)
* 11c2f8fd - cuisongliu - fix(main): bootstrap registry before all step (https://github.com/labring/sealos/pull/#2742)
* 3fae3c42 - 晓杰 - fix: user limit memory too small lead to pod oom (https://github.com/labring/sealos/pull/#2750)
* 0eb07c46 - yy - add app rbac to user ns. (https://github.com/labring/sealos/pull/#2730)
* debc6c49 - zzjin - Fix readme typo. (https://github.com/labring/sealos/pull/#2748)
* 4a5149e5 - zzjin - Delete unused docs&files. (https://github.com/labring/sealos/pull/#2747)
* 076cf70c - zzjin - Fix Readme assets, using absolute path. (https://github.com/labring/sealos/pull/#2745)
* 3b9ab158 - Meteorite - debug: hostname too long (https://github.com/labring/sealos/pull/#2743)
* 3c29adb4 - fengxsong - fix: provide a common way to wrap bash (https://github.com/labring/sealos/pull/#2739)
* 5418faf0 - zzjin - Add Temp pre-installed deploy-manager (https://github.com/labring/sealos/pull/#2737)
* 3c362ffc - zzjin - rebase doc (https://github.com/labring/sealos/pull/#2735)
* 87b502ce - cuisongliu - fix(main): alt-names empty check (https://github.com/labring/sealos/pull/#2733)
* eafdc1c7 - zzjin - Fix en Intro.md images. (https://github.com/labring/sealos/pull/#2732)
* bd51db4a - Meteorite - add new driver interface and fix some bugs (https://github.com/labring/sealos/pull/#2720)
* 2b51d7bb - cuisongliu - fix(main): delete ipvs ip link (https://github.com/labring/sealos/pull/#2729)
* 32810dc4 - cuisongliu - fix(main): shell Wrapper from env (https://github.com/labring/sealos/pull/#2711)
* d4c0398f - yy - add imagehub frontend deploy.yaml (https://github.com/labring/sealos/pull/#2727)
* d774d064 - yy - feat: add ctime to image detail. (https://github.com/labring/sealos/pull/#2726)
* 630caa69 - zhujingyang - docs how to deploy the application to desktop (https://github.com/labring/sealos/pull/#2718)
* 082923cb - zhujingyang - sealos-image-hub (https://github.com/labring/sealos/pull/#2700)
* 669fba99 - Carson Yang - Update README (https://github.com/labring/sealos/pull/#2724)
* b1b01df4 - 晓杰 - user add clusterrole rbac (https://github.com/labring/sealos/pull/#2722)
* f38c6cac - gitccl - get terminal domain from env (https://github.com/labring/sealos/pull/#2717)
* 7b01f946 - Jiahui - Fix when no app image is specified, run error but the command condition still returns success (https://github.com/labring/sealos/pull/#2715)
* 6b5b2bd8 - Xin He - BUG: setting external etcd address does not take effect (https://github.com/labring/sealos/pull/#2704)
* 235a611a - Jiahui - fix `runtime error: slice bounds out of range [:19] with length 0` (https://github.com/labring/sealos/pull/#2713)
* cf6df12c - 晓杰 - add account balance when account is new user (https://github.com/labring/sealos/pull/#2710)
* 35dc0003 - cuisongliu - fix(main): set short for create feature (https://github.com/labring/sealos/pull/#2708)
* e369f67d - Meteorite - feat: modify infra CRD and support aliyun (https://github.com/labring/sealos/pull/#2682)
* 38fd41b2 - yy - delete cmd, use image cmd. (https://github.com/labring/sealos/pull/#2703)
* c11539ca - zhujingyang - modify the account and add the iframe imagehub (https://github.com/labring/sealos/pull/#2698)
* 16c23bd6 - yy - fix authz logic. (https://github.com/labring/sealos/pull/#2701)
* 50e447f6 - zzjin - Add actions inputs (https://github.com/labring/sealos/pull/#2697)
* 7958c0f0 - zhujingyang - Move desktop to frontend (https://github.com/labring/sealos/pull/#2694)
* 76c63491 - zzjin - Update mod typo (https://github.com/labring/sealos/pull/#2696)
* a612d648 - 榴莲榴莲 - Fix double reconcile by status updates (https://github.com/labring/sealos/pull/#2676)
* 6fc4d4ab - zzjin - Fix errors pkg nil checker (https://github.com/labring/sealos/pull/#2695)
* 867b0f17 - zhihui - bugfix: change CRI version (https://github.com/labring/sealos/pull/#2680)
* 445139dc - Xin He - feature: single host should allow scheduling to master (https://github.com/labring/sealos/pull/#2654)
* 7212f4ad - cuisongliu - fix(main): add changelog (https://github.com/labring/sealos/pull/#2683)
* 688743f3 - 晓杰 - rolebing.subject.naemspace should set user-system (https://github.com/labring/sealos/pull/#2681)
+70
View File
@@ -0,0 +1,70 @@
- [v4.2.0-alpha2](#v420-alpha2)
- [Downloads for v4.2.0-alpha2](#downloads-for-v420-alpha2)
- [Source Code](#source-code)
- [Client Binaries](#client-binaries)
- [Usage](#usage)
- [Changelog since v4.2.0-alpha1](#changelog-since-v420-alpha1)
# [v4.2.0-alpha2](https://github.com/labring/sealos/releases/tag/v4.2.0-alpha2)
## Downloads for v4.2.0-alpha2
### Source Code
filename |
-------- |
[v4.2.0-alpha2.tar.gz](https://github.com/labring/sealos/archive/refs/tags/v4.2.0-alpha2.tar.gz) |
### Client Binaries
filename |
-------- |
[sealos_4.2.0-alpha2_linux_amd64.tar.gz](https://github.com/labring/sealos/releases/download/v4.2.0-alpha2/sealos_4.2.0-alpha2_linux_amd64.tar.gz) |
[sealos_4.2.0-alpha2_linux_arm64.tar.gz](https://github.com/labring/sealos/releases/download/v4.2.0-alpha2/sealos_4.2.0-alpha2_linux_arm64.tar.gz) |
## Usage
amd64:
```shell
wget https://github.com/labring/sealos/releases/download/v4.2.0-alpha2/sealos_4.2.0-alpha2_linux_amd64.tar.gz && tar -zxvf sealos_4.2.0-alpha2_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
## create a cluster for sealos
sealos run labring/kubernetes:v1.24.0 labring/calico:v3.22.1 --masters 192.168.64.2,192.168.64.22,192.168.64.20 --nodes 192.168.64.21,192.168.64.19 --passwd your-own-ssh-passwd
```
arm64:
```shell
wget https://github.com/labring/sealos/releases/download/v4.2.0-alpha2/sealos_4.2.0-alpha2_linux_arm64.tar.gz && tar -zxvf sealos_4.2.0-alpha2_linux_arm64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
## create a cluster for sealos
sealos run labring/kubernetes:v1.24.0 labring/calico:v3.22.1 --masters 192.168.64.2,192.168.64.22,192.168.64.20 --nodes 192.168.64.21,192.168.64.19 --passwd your-own-ssh-passwd
```
## Changelog since v4.2.0-alpha1
### What's Changed
* 22baae1a - cuisongliu - feature(main): delete registry code from fork (https://github.com/labring/sealos/pull/#2875)
* 41d2092f - Zihan Li - feat: update RunNewImages based on image diffs (https://github.com/labring/sealos/pull/#2856)
* afb274c7 - zhujingyang - feat desktop notification system (https://github.com/labring/sealos/pull/#2809)
* 7c1d411a - 晓杰 - fix metering e2e ci (https://github.com/labring/sealos/pull/#2873)
* 6c45ffed - 晓杰 - feat: add Notification CRD (https://github.com/labring/sealos/pull/#2580)
* fb01faca - 晓杰 - refactor:Strip billing function to reosurce-controller (https://github.com/labring/sealos/pull/#2811)
* 75dd26e7 - cuisongliu - feature(main): add token config for token cmd (https://github.com/labring/sealos/pull/#2869)
* 0ba7843d - cuisongliu - feature(main): replace name ref from registry (https://github.com/labring/sealos/pull/#2834)
* 6c49e19e - 榴莲榴莲 - Add rateLimiter opts for controllers (https://github.com/labring/sealos/pull/#2831)
* b338add0 - 晓杰 - Feat: add Debt CRD, limit user rbac when in arrears (https://github.com/labring/sealos/pull/#2634)
* 26df5bfb - yy - feat. registry add pull limit. (https://github.com/labring/sealos/pull/#2857)
* 7593a1dd - cuisongliu - feature(main): using bootstrap undo (https://github.com/labring/sealos/pull/#2867)
* 339adfa1 - Xinwei Xiong - fix: Password does not add single quotes will identify environment va… (https://github.com/labring/sealos/pull/#2862)
* ec97abfb - fengxsong - feat: add auto answer sudo prompt in ssh command (https://github.com/labring/sealos/pull/#2840)
* a02ebcaf - fengxsong - fix: ensure response body has to be read fully and close correctly; also use a sharedclients (https://github.com/labring/sealos/pull/#2855)
* 69bd0edb - fengxsong - feat: register all versions of the ImageServiceServer (https://github.com/labring/sealos/pull/#2853)
* cc8027c7 - fengxsong - fix: avoid rendering template repeatedly (https://github.com/labring/sealos/pull/#2852)
* 6071e10a - 晓杰 - fix(): cluster make build fail and controller ci fail (https://github.com/labring/sealos/pull/#2847)
* 56a2e78f - cuisongliu - feature(main): add env image test (https://github.com/labring/sealos/pull/#2845)
* 373c1f7f - zhujingyang - fix pgsql create default state (https://github.com/labring/sealos/pull/#2843)
* 15bcbc31 - zhujingyang - fix the request header problem (https://github.com/labring/sealos/pull/#2846)
* 7836f557 - fengxsong - fix(ci): golangci-lint error (https://github.com/labring/sealos/pull/#2844)
* 111e7ec4 - zhujingyang - Request failed to switch config (https://github.com/labring/sealos/pull/#2835)
* de1a400f - zhujingyang - Change 1 RMB equals 10000 (https://github.com/labring/sealos/pull/#2839)
* abc607f4 - fengxsong - fix: json tag of ssh field (https://github.com/labring/sealos/pull/#2830)
+25 -21
View File
@@ -1,24 +1,28 @@
# CHANGELOGs
# Changelog
- [CHANGELOG-4.0.0.md](./CHANGELOG-4.0.0.md)
- [CHANGELOG-4.1.0-rc1.md](./CHANGELOG-4.1.0-rc1.md)
- [CHANGELOG-4.1.0-rc2.md](./CHANGELOG-4.1.0-rc2.md)
- [CHANGELOG-4.1.0-rc3.md](./CHANGELOG-4.1.0-rc3.md)
- [CHANGELOG-4.1.0.md](./CHANGELOG-4.1.0.md)
- [CHANGELOG-4.1.1.md](./CHANGELOG-4.1.1.md)
- [CHANGELOG-4.1.2-rc1.md](./CHANGELOG-4.1.2-rc1.md)
- [CHANGELOG-4.1.2.md](./CHANGELOG-4.1.2.md)
All notable changes to this project will be documented in this file.
- [CHANGELOG-4.2.0-alpha2.md](./CHANGELOG-4.2.0-alpha2.md)
- [CHANGELOG-4.2.0-alpha1.md](./CHANGELOG-4.2.0-alpha1.md)
- [CHANGELOG-4.1.7.md](./CHANGELOG-4.1.7.md)
- [CHANGELOG-4.1.5-rc3.md](./CHANGELOG-4.1.5-rc3.md)
- [CHANGELOG-4.1.5-rc2.md](./CHANGELOG-4.1.5-rc2.md)
- [CHANGELOG-4.1.5-rc1.md](./CHANGELOG-4.1.5-rc1.md)
- [CHANGELOG-4.1.5-alpha2.md](./CHANGELOG-4.1.5-alpha2.md)
- [CHANGELOG-4.1.5-alpha1.md](./CHANGELOG-4.1.5-alpha1.md)
- [CHANGELOG-4.1.5.md](./CHANGELOG-4.1.5.md)
- [CHANGELOG-4.1.4-rc4.md](./CHANGELOG-4.1.4-rc4.md)
- [CHANGELOG-4.1.4-rc3.md](./CHANGELOG-4.1.4-rc3.md)
- [CHANGELOG-4.1.4-rc2.md](./CHANGELOG-4.1.4-rc2.md)
- [CHANGELOG-4.1.4-rc1.md](./CHANGELOG-4.1.4-rc1.md)
- [CHANGELOG-4.1.4.md](./CHANGELOG-4.1.4.md)
- [CHANGELOG-4.1.3-rc1.md](./CHANGELOG-4.1.3-rc1.md)
- [CHANGELOG-4.1.3.md](./CHANGELOG-4.1.3.md)
- [CHANGELOG-4.1.4-rc1.md](./CHANGELOG-4.1.4-rc1.md)
- [CHANGELOG-4.1.4-rc2.md](./CHANGELOG-4.1.4-rc2.md)
- [CHANGELOG-4.1.4-rc3.md](./CHANGELOG-4.1.4-rc3.md)
- [CHANGELOG-4.1.4-rc4.md](./CHANGELOG-4.1.4-rc4.md)
- [CHANGELOG-4.1.4.md](./CHANGELOG-4.1.4-rc4.md)
- [CHANGELOG-4.1.5-alpha1.md](./CHANGELOG-4.1.5-alpha1.md)
- [CHANGELOG-4.1.5-alpha2.md](./CHANGELOG-4.1.5-alpha2.md)
- [CHANGELOG-4.1.5-rc1.md](./CHANGELOG-4.1.5-rc1.md)
- [CHANGELOG-4.1.5-rc2.md](./CHANGELOG-4.1.5-rc2.md)
- [CHANGELOG-4.1.5-rc3.md](./CHANGELOG-4.1.5-rc3.md)
- [CHANGELOG-4.1.5.md](./CHANGELOG-4.1.5.md)
- [CHANGELOG-4.1.7.md](./CHANGELOG-4.1.5.md)
- [CHANGELOG-4.1.2-rc1.md](./CHANGELOG-4.1.2-rc1.md)
- [CHANGELOG-4.1.2.md](./CHANGELOG-4.1.2.md)
- [CHANGELOG-4.1.1.md](./CHANGELOG-4.1.1.md)
- [CHANGELOG-4.1.0-rc3.md](./CHANGELOG-4.1.0-rc3.md)
- [CHANGELOG-4.1.0-rc2.md](./CHANGELOG-4.1.0-rc2.md)
- [CHANGELOG-4.1.0-rc1.md](./CHANGELOG-4.1.0-rc1.md)
- [CHANGELOG-4.1.0.md](./CHANGELOG-4.1.0.md)
- [CHANGELOG-4.0.0.md](./CHANGELOG-4.0.0.md)
+40
View File
@@ -0,0 +1,40 @@
# Generate Changelog Usage Guide
1. Preparation
Ensure that your project has a directory named `CHANGELOG` to store the Changelog files for each version. If you do not have this directory yet, create it:
```shell
mkdir "CHANGELOG"
```
2. Generate a specific version's Changelog file and automatically merge it
Use the scripts/generate-changelog.sh script to generate a specific version's Changelog file and automatically merge it into the CHANGELOG.md file. Run the following command:
```shell
bash scripts/generate-changelog.sh <version> [<previous_version>]
```
- <version>The version number for which you want to generate the Changelog (e.g., 1.0.0).
- [<previous_version>]An optional parameter representing the previous version number to compare with. If not provided, the script will automatically retrieve the previous version number.
For example, to generate the Changelog file for version 1.0.0, run:
```shell
bash scripts/generate-changelog.sh 1.0.0
```
The script will create a file named CHANGELOG-1.0.0.md in the CHANGELOG directory.
3. Commit the Changelog to the version control system
After generating and merging the Changelog files, commit them to the version control system (e.g., Git) so that other project members can view and track the project's change history.
```shell
git add CHANGELOG CHANGELOG.md
git commit -m "Add Changelog for version 1.0.0"
git push
```
Now, you have successfully generated the Changelog file for your project and merged it into a unified CHANGELOG.md file. Make sure to perform these steps every time you release a new version, so the project always has the most recent and complete change history.
+41
View File
@@ -0,0 +1,41 @@
# Generate Changelog 使用说明文档
1. 准备工作
请确保您的项目中有一个名为 CHANGELOG 的目录,该目录将用于存放每个版本的 Changelog 文件。如果还没有这个目录,请创建它:
```shell
mkdir "CHANGELOG"
```
2. 生成特定版本的 Changelog 文件并自动合并
使用 scripts/generate-changelog.sh 脚本生成特定版本的 Changelog 文件,并自动将其合并到 CHANGELOG.md 文件。运行以下命令。运行以下命令:
```shell
bash scripts/generate-changelog.sh <version> [<previous_version>]
```
- <version>:要生成 Changelog 的版本号(例如:1.0.0)。
- [<previous_version>]:可选参数,表示要比较的上一个版本号。如果不提供此参数,脚本将自动获取上一个版本号。
例如,要生成版本 1.0.0 的 Changelog 文件,可以运行:
```shell
bash scripts/generate-changelog.sh 1.0.0
```
脚本将在 CHANGELOG 目录中生成一个名为 CHANGELOG-1.0.0.md 的文件。
3. 将 Changelog 提交到版本控制系统
在生成和合并 Changelog 文件后,请将它们提交到版本控制系统(如 Git),以便其他项目成员能够查看和跟踪项目的变更历史。
```shell
git add CHANGELOG CHANGELOG.md
git commit -m "Add Changelog for version 1.0.0"
git push
```
现在,您已经成功为项目生成了 Changelog 文件,并将其合并到了一个统一的 CHANGELOG.md 文件中。请确保在每次发布新版本时都执行这些步骤,以便项目始终具有最新和完整的变更历史记录。
@@ -12,22 +12,35 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION=$1
PREV_VERSION=$2
if [ -z "$VERSION" ]; then
VERSION=$(git describe --abbrev=0 --tags)
fi
VERSION=${VERSION#v}
if [ -z "$PREV_VERSION" ]; then
PREV_VERSION=$(git describe --abbrev=0 --tags v${VERSION}^)
fi
PREV_VERSION=${PREV_VERSION#v}
VERSION_POINT=${VERSION//./}
PREV_VERSION_POINT=${PREV_VERSION//./}
cat << EOF > CHANGELOG/CHANGELOG-${VERSION}.md
- [v${VERSION}](#v400)
- [Downloads for v${VERSION}](#downloads-for-)
- [v${VERSION}](#v${VERSION_POINT})
- [Downloads for v${VERSION}](#downloads-for-v${VERSION_POINT})
- [Source Code](#source-code)
- [Client Binaries](#client-binaries)
- [Usage](#usage)
- [Changelog since v${VERSION}](#changelog-since-)
- [NewContributors](#new-contributors)
- [Changelog since v${PREV_VERSION}](#changelog-since-v${PREV_VERSION_POINT})
# [v${VERSION}](https://github.com/labring/sealos/releases/tag/v${VERSION})
## Downloads for v${VERSION}
### Source Code
filename |
@@ -61,12 +74,18 @@ wget https://github.com/labring/sealos/releases/download/v${VERSION}/sealos_${V
sealos run labring/kubernetes:v1.24.0 labring/calico:v3.22.1 --masters 192.168.64.2,192.168.64.22,192.168.64.20 --nodes 192.168.64.21,192.168.64.19 --passwd your-own-ssh-passwd
\`\`\`
## Changelog since v${VERSION}
## Changelog since v${PREV_VERSION}
### What's Changed
EOF
git log --pretty=format:"* %h - %an - %s" v${PREV_VERSION}...v${VERSION} | sed -E 's/#[0-9]+/https:\/\/github.com\/labring\/sealos\/pull\/&/g' >> CHANGELOG/CHANGELOG-${VERSION}.md
echo "# Changelog" > CHANGELOG/CHANGELOG.md
echo -e "\nAll notable changes to this project will be documented in this file.\n" >> CHANGELOG/CHANGELOG.md
for file in $(ls CHANGELOG |grep -v '^CHANGELOG.md$' | sort -V -r); do
version=$(echo $file | sed -E 's/CHANGELOG-(.*)\.md/\1/')
echo -e "- [CHANGELOG-${version}.md](./CHANGELOG-${version}.md)" >> CHANGELOG/CHANGELOG.md
done