-
Notifications
You must be signed in to change notification settings - Fork 558
Documentation ( Installation, Quick Start), Changelog template , Release process #392
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
afa5303
add changelog
lalitb 285b50c
modify README.md
lalitb 56a692f
format
lalitb adf9799
add pre-release script
lalitb 8e3e031
format script
lalitb e5cc673
add error check
lalitb a1c70e2
add release steps
lalitb 254ffe7
fix script
lalitb f95ce08
fix changelog format
lalitb 843c52d
fix readme
lalitb 5cf3ebe
remove new line
lalitb c0ea1fd
fix script
lalitb 6b229eb
Update pre_release.sh
lalitb a1dc924
add install.md template
lalitb 9c10969
update README with deployment structore
lalitb 66f1b42
fix script
lalitb 2fcd4b3
Update README.md
lalitb fdb7122
remove install info
lalitb 92ac148
Merge branch 'master' into test-release
reyang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
| and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
|
||
| ## [Unreleased] | ||
| ### Added | ||
| * Trace API and SDK | ||
| * OTLP Exporter | ||
| ### Changed | ||
| ### Removed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ## TODO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Release Process | ||
|
|
||
| ## Pre Release | ||
|
|
||
| 1. Make sure all relevant changes for this release are included under `Unreleased` section in `CHANGELOG.md` and are in language that non-contributors to the project can understand. | ||
|
|
||
| 2. Run the pre-release script. It creates a branch `pre_release_<new-tag>` and updates `CHANGELOG.md` with the `<new-tag>`: | ||
|
lalitb marked this conversation as resolved.
|
||
| ``` | ||
| ./pre_release.sh -t <new-tag> | ||
| ``` | ||
| 3. Verify that CHANGELOG.md is updated properly: | ||
| ``` | ||
| git diff master | ||
| ``` | ||
| 4. Push the changes to upstream and create a Pull Request on GitHub. | ||
| Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description. | ||
|
|
||
| ## Tag | ||
|
|
||
| Once the above Pull Request has been approved and merged it is time to tag the merged commit. | ||
|
|
||
| ***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step! | ||
| Failure to do so will leave things in a broken state. | ||
|
|
||
| 1. Note down the commit hash of the master branch after above PR request is merged : <commit-hash> | ||
| ``` | ||
| git show -s --format=%H | ||
| ``` | ||
| 2. Create a github tag on this commit hash: | ||
| ``` | ||
| git tag -a "<new-tag>" -s -m "Version <new-tag>" "<commit-hash>" | ||
|
|
||
| 3. Push tag to upstream remote | ||
| ``` | ||
| git push upstream | ||
| ``` | ||
|
|
||
| ## Release | ||
| Finally create a Release for the new <new-tag> on GitHub. The release body should include all the release notes from the Changelog for this release. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| #!/bin/bash | ||
|
|
||
| usage() { echo "Usage: $0 -t <tag>" 1>&2; exit 1; } | ||
|
|
||
| while getopts ":t:" o; do | ||
| case "${o}" in | ||
| t) | ||
| tag=${OPTARG} | ||
| ;; | ||
| *) | ||
| usage | ||
| ;; | ||
| esac | ||
| done | ||
| if [ ! -z "${t}" ]; then | ||
| usage | ||
| fi | ||
|
|
||
| #validate tag | ||
|
lalitb marked this conversation as resolved.
|
||
| semver_regex="^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(\\-[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?(\\+[0-9A-Za-z-]+(\\.[0-9A-Za-z-]+)*)?$" | ||
| if [[ ${tag} =~ ${semver_regex} ]]; then | ||
| echo "${tag} is valid semver tag" | ||
| else | ||
| echo "Error: ${tag} is not a valid semver tag. Exiting" | ||
| exit -1 | ||
| fi | ||
|
|
||
| #ensure tag doesn't exits | ||
| if [[ $(git tag --list ${tag}) ]]; then | ||
| echo "Error: Tag ${tag} already exists. Exiting" | ||
| exit -1 | ||
| fi | ||
|
|
||
| if ! git diff --quiet; then \ | ||
|
lalitb marked this conversation as resolved.
|
||
| echo "Error: Working tree is not clean, can't proceed with the release process\n" | ||
| git status | ||
| git diff | ||
| exit 1 | ||
| fi | ||
|
|
||
| # check changelog exists | ||
| changelog_file="./CHANGELOG.md" | ||
|
lalitb marked this conversation as resolved.
|
||
| if [ ! -f $changelog_file ]; then | ||
| echo "Error: $changelog_file doesn't exist. Ensure that you are running this script from repo root directory " | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [ ! grep -q "## [Unreleased]" $changelog_file ]; then | ||
| echo "Error: $changelog_file doesn't contain Unreleased information. Please update the file with changes and run this script again." | ||
| exit 1 | ||
| fi | ||
|
|
||
| git checkout -b pre_release_${tag} master | ||
| if [ $? -ne 0 ]; then | ||
| echo "Error: Cannot create release branch. Ensure you have sufficient permissions to repo and try again." | ||
| exit 1 | ||
| fi | ||
|
|
||
| # update CHANGELOG.md | ||
| date=$(date '+%Y-%m-%d') | ||
| sed -i "/\#\# \[Unreleased\]/a\\ \n\#\# \[${tag}\] ${date}" $changelog_file | ||
| if [$? -ne 0]; then | ||
| echo "Error: Cannot update CHANGELOG.md file. Update it manually, create the ${tag} and push changes to upstream" | ||
| exit 1 | ||
| fi | ||
|
lalitb marked this conversation as resolved.
|
||
|
|
||
| git add . | ||
| git commit -m "Prepare for releasing ${tag}" | ||
|
|
||
| echo "Now validate the chages using git diff master, create the ${tag} and push changes to upstream" | ||
| echo | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.