diff --git a/.github/release-template.ejs b/.github/release-template.ejs
index 92cf7f0f..4fdffc09 100644
--- a/.github/release-template.ejs
+++ b/.github/release-template.ejs
@@ -1,6 +1,4 @@
-<%
-
-var groupCommits = [{
+<% var groupCommits = [{
name: 'feat',
show: true,
list: []
@@ -16,13 +14,19 @@ var groupCommits = [{
name: 'docs',
show: true,
list: []
+}, {
+ name: 'test',
+ show: true,
+ list: []
}, {
name: 'other',
show: true,
list: []
-}]
+}
+]
var all_titles = {};
+var commitHref = "https://github.com/gnes-ai/gnes/commit/"
commits.forEach(function (commit) {
@@ -63,6 +67,13 @@ commits.forEach(function (commit) {
title: title,
commit: commit
})
+ } else if(type == 'test' || type == 'tests' || type == 'ci'){
+ groupCommits.find(item => item.name === 'test').list.push({
+ type: type,
+ scope: scope,
+ title: title,
+ commit: commit
+ })
} else {
groupCommits.find(item => item.name === 'other').list.push({
type: type,
@@ -96,36 +107,28 @@ list.forEach(function (ct) {
title = commit.title;
}
%> - <% if(typeof commitHref === 'undefined' || commitHref === '') { %>[```<%=commit.sha1.slice(0,8)%>```]<% } else { %>[[```<%=commit.sha1.slice(0,8)%>```](<%=commitHref%><%=commit.sha1%>)]<%}%> __-__ <%=title%> (<%= commit.authorName %>)
-<% })}
-%>
-
-# Release Notes
-
+<% })} %>
<%
-
-
for(var i of groupCommits){
if(i.list.length == 0) continue;
if (i.name === 'fix' && i.show) { %>
-
-### Bug fixes
+### 🐞 Bug fixes
<% } else if( i.name === 'feat' && i.show) { %>
-
-### New Features
+### 🆕 New Features
<% } else if(i.name === 'refactor' && i.show) { %>
-
-### Code Refactoring
+### 🚧 Code Refactoring
<% } else if(i.name === 'docs' && i.show) { %>
+### 📗 Documentation
-### Documentation
+<% } else if(i.name === 'test' && i.show) { %>
+### 🏁 Unit Test and CICD
<% } else if (i.name === 'other' && i.show) { %>
-
-### Other Improvements
+### 🍹 Other Improvements
<% }
i.show && listCommits(i.list, i);
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..e69de29b
diff --git a/README.md b/README.md
index 94936c92..a05871d8 100644
--- a/README.md
+++ b/README.md
@@ -48,9 +48,9 @@ GNES enables large-scale index and semantic search for text-to-text, image-to-im
Highlights
-- :cloud: **Cloud-native**: GNES is *all-in-microservice*: encoder, indexer, preprocessor and router are all running statelessly and independently in their own containers. They communicate via versioned APIs and collaborate under the orchestration of Docker Swarm/Kubernetes etc. Scaling, load-balancing, automated recovering, they come off-the-shelf in GNES.
+- :cloud: **Cloud-native and elastic**: GNES is *all-in-microservice*: encoder, indexer, preprocessor and router are all running in their own containers. They communicate via versioned APIs and collaborate under the orchestration of Docker Swarm/Kubernetes etc. Scaling, load-balancing, automated recovering, they come off-the-shelf in GNES.
- :hatching_chick: **Easy-to-use on every level**: How long would it take to deploy a change that involves just changing the encoder from BERT to ELMO or switching a layer in VGG? In GNES, this is just one line change in a YAML file. We abstract the encoding and indexing logic from the code to a YAML config, so that you can combine or stack encoders and indexers without even touching the codebase.
-- :rocket: **State-of-the-art**: Taking advantage of fast-evolving AI/ML/NLP/CV communities, we learn from best-of-breed deep learning models and plug them into GNES, making sure you always enjoy the state-of-the-art performance.
+- :rocket: **State-of-the-art performance**: Taking advantage of fast-evolving AI/ML/NLP/CV communities, we learn from best-of-breed deep learning models and plug them into GNES, making sure you always enjoy the state-of-the-art performance.
- :nut_and_bolt: **Generic and compatible**: Searching for texts, image or even short-videos? Using Python/C/Java/Go/HTTP as the client? Doesn't matter which content form you have or which language do you use, GNES can handle them all.
- :100: **Best practice**: We love to learn the best practice from the community, helping our GNES to achieve the next level of availability, resiliency, performance, and durability. If you have any ideas or suggestions, feel free to contribute.
@@ -174,13 +174,16 @@ TBA
Contributing
-Thanks for your interest in contributing! There are many ways to get involved; start with our [contributor guidelines](#) and then check these [open issues](/issues) for specific tasks.
+Thanks for your interest in contributing!
+
+- [Contributor guidelines](./CONTRIBUTING.md)
+- [Open issues](/issues)
+- [Release notes](./CHANGELOG.md)
For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods.
-Release Notes
-TBA
+
Citing GNES
diff --git a/release.sh b/release.sh
index ef24b547..b593883c 100755
--- a/release.sh
+++ b/release.sh
@@ -1,5 +1,9 @@
#!/usr/bin/env bash
+# Requirements
+# brew install hub
+# npm install -g git-release-notes
+
set -e
INIT_FILE='gnes/__init__.py'
@@ -37,9 +41,24 @@ function pub_pypi {
}
function pub_gittag {
- git tag $VER -m "$(cat ./CHANGELOG.md)"
- git remote add $SOURCE_ORIGIN https://hanxiao:${GITHUB_ACCESS_TOKEN}@github.com/gnes-ai/gnes.git
+ git tag $VER -m "$(cat ./CHANGELOG.tmp)"
+ # git remote add $SOURCE_ORIGIN https://hanxiao:${GITHUB_ACCESS_TOKEN}@github.com/gnes-ai/gnes.git
git push $SOURCE_ORIGIN $VER
+ rm ./CHANGELOG.tmp
+}
+
+function make_chore_pr {
+ git checkout -B "chore-bumping-version"
+ git add ./CHANGELOG.md
+ git commit -m "chore(changelog): update change log to $1"
+ git push $SOURCE_ORIGIN chore-bumping-version --force
+ hub pull-request -m "chore(changelog): update change log to $1" --no-edit -l new-release -r gnes-ai/dev-core
+ git checkout master
+}
+
+function make_release_note {
+ git-release-notes $1..HEAD .github/release-template.ejs > ./CHANGELOG.tmp
+ printf '\n%s\n%s\n%s\n%s\n' "# Release Note (\`$2\`)" "> Release time: $(date +'%Y-%m-%d %H:%M:%S')" "$(cat ./CHANGELOG.tmp)" "$(cat ./CHANGELOG.md)" > ./CHANGELOG.md
}
BRANCH=$(git rev-parse --abbrev-ref HEAD)
@@ -50,25 +69,29 @@ fi
#$(grep "$VER_TAG" $CLIENT_CODE | sed -n 's/^.*'\''\([^'\'']*\)'\''.*$/\1/p')
-VER=$(git tag -l | sort -V |tail -n1)
-printf "current version:\t\e[1;33m$VER\e[0m\n"
+OLDVER=$(git tag -l | sort -V |tail -n1)
+printf "current version:\t\e[1;33m$OLDVER\e[0m\n"
-git-release-notes v$VER..HEAD .github/release-template.ejs > ./CHANGELOG.md
-
-VER=$(echo $VER | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')
+VER=$(echo $OLDVER | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')
printf "bump version to:\t\e[1;32m$VER\e[0m\n"
+make_release_note $OLDVER $VER
+
+head -n10 ./CHANGELOG.md
+
read -p "release this version? " -n 1 -r
-#echo # (optional) move to a new line
-#if [[ $REPLY =~ ^[Yy]$ ]]
-#then
-# write back tag to client and server code
-VER_VAL=$VER_TAG"'"${VER#"v"}"'"
-change_line "$VER_TAG" "$VER_VAL" $INIT_FILE
-pub_pypi
-pub_gittag
-mv ${TMP_INIT_FILE} $INIT_FILE
-#fi
+echo # (optional) move to a new line
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+ # write back tag to client and server code
+ VER_VAL=$VER_TAG"'"${VER#"v"}"'"
+ change_line "$VER_TAG" "$VER_VAL" $INIT_FILE
+ pub_pypi
+ pub_gittag
+ # change the version line back
+ mv ${TMP_INIT_FILE} $INIT_FILE
+ make_chore_pr $VER
+fi