fix(console): Fixed versioning, publishing and changelog generation

This commit is contained in:
Abhik Roy
2023-10-12 20:58:20 +11:00
committed by Suren Gabrielyan
parent 1ac4e41771
commit 3081f1a69c
4 changed files with 34 additions and 14 deletions

View File

@ -50,13 +50,15 @@ jobs:
sudo apt-get -y install doxygen clang python3-pip
python -m pip install breathe recommonmark esp-docs==1.4.1
for comp in `ls components`; do
cd $GITHUB_WORKSPACE/docs/${comp}
if [[ "${{ env.BUMP_COMPONENT }}" == "${comp}" ]]; then
echo "Building specific version of ${comp} (${{ env.BUMP_VERSION }})"
./generate_docs ${{ env.BUMP_VERSION }}
else
echo "Building latest version of ${comp}"
./generate_docs
if [ -d $GITHUB_WORKSPACE/docs/${comp} ]; then
cd $GITHUB_WORKSPACE/docs/${comp}
if [[ "${{ env.BUMP_COMPONENT }}" == "${comp}" ]]; then
echo "Building specific version of ${comp} (${{ env.BUMP_VERSION }})"
./generate_docs ${{ env.BUMP_VERSION }}
else
echo "Building latest version of ${comp}"
./generate_docs
fi
fi
done
- name: Deploying generated docs
@ -67,14 +69,16 @@ jobs:
export GIT_VER=$(git describe --always)
export GITHUB_REF_NAME=latest
for comp in `ls components`; do
echo "Deploying latest of ${comp}"
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/${comp}
export DOCS_DEPLOY_PATH=$DOCS_DEPLOY_PATH_ORIG/${comp}
cd $GITHUB_WORKSPACE/docs/${comp}
deploy-docs
if [ -d $GITHUB_WORKSPACE/docs/${comp} ]; then
echo "Deploying latest of ${comp}"
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/${comp}
export DOCS_DEPLOY_PATH=$DOCS_DEPLOY_PATH_ORIG/${comp}
cd $GITHUB_WORKSPACE/docs/${comp}
deploy-docs
fi
done;
# Deploy docs with version path
if [[ "${{ env.BUMP_VERSION }}" != "" ]]; then
if [[ "${{ env.BUMP_VERSION }}" != "" ]] && [[ -d $GITHUB_WORKSPACE/docs/${comp} ]]; then
echo "Deploying specific version of ${comp} (${{ env.BUMP_VERSION }})"
cd $GITHUB_WORKSPACE/docs/${{ env.BUMP_COMPONENT }}
export GITHUB_REF_NAME=${{ env.BUMP_VERSION }}

View File

@ -0,0 +1,8 @@
---
commitizen:
bump_message: 'bump(console): $current_version -> $new_version'
pre_bump_hooks: python ../../ci/changelog.py console_simple_init
tag_format: console_simple_init-v$version
version: 1.0.0
version_files:
- idf_component.yml

View File

@ -0,0 +1,8 @@
# Changelog
## [1.0.0](https://github.com/espressif/esp-protocols/commits/console_simple_init-v1.0.0)
### Features
- [Added simple component for console initialization](https://github.com/espressif/esp-protocols/commit/1ac4e4177128a7b7188babd47d0e2bfa6bbb2517)

View File

@ -1,6 +1,6 @@
version: 1.0.0
url: https://github.com/espressif/esp-protocols/tree/master/components/console_simple_init
description: The component provides helper functions for easy initialization and start of esp console.
url: https://github.com/espressif/esp-protocols/tree/master/components/console_simple_init
dependencies:
idf:
version: '>=5.0'