Skip to content

Commit

Permalink
Process documentation (#300)
Browse files Browse the repository at this point in the history
Adding documentation of the various development processes.

Co-authored-by: Glyn Hudson <glynhudson@users.noreply.github.com>
  • Loading branch information
jeremypoulter and glynhudson authored Feb 28, 2022
1 parent 14619fe commit a87958d
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release_validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Release Validation

on:
release:
types:
- released
- prereleased
- edited

jobs:
gui_validation:
name: Pre-built GUI Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive

### Check the pre-built GUI files are up-to-date

- name: Set up Node JS
uses: actions/setup-node@v2
with:
node-version: '12'

- name: Install dependencies
run: |
cd gui
npm install
- name: Build GUI
run: |
cd gui
npm run build
- name: Check the pre-built GUI files are up-to-date
run: |
set +e
git status -s | grep " M "
if [ $? -eq 0 ]; then
echo "ERROR: The pre-built GUI files are not up-to-date"
exit 1
fi
release_number:
name: Release Number Validation
runs-on: ubuntu-latest
if: github.ref_name != 'latest'

steps:
### Check the version number in the code matches the tag number
- name: Retrieve the version number(s)
run: |
TAG_VERSION=$(sed "s/^v//" <<< $GITHUB_REF_NAME)
CODE_VERSION=$(grep BUILD_TAG platformio.ini | awk -F= '{print $NF}')
echo TAG_VERSION=$TAG_VERSION >> $GITHUB_ENV
echo CODE_VERSION=$CODE_VERSION >> $GITHUB_ENV
- name: Check the version numberis semver compliant
run: |
if ! [[ $TAG_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]*[0-9]+)?$ ]]; then
echo "ERROR: The version number is not semver compliant"
exit 1
fi
- name: Check the version number in the code matches the tag number
run: |
if [ "$TAG_VERSION" != "$CODE_VERSION" ]; then
echo "ERROR: The version number in the code ($CODE_VERSION) does not match the tag number ($TAG_VERSION)"
exit 1
fi
39 changes: 39 additions & 0 deletions docs/process.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# OpenEVSE Process Documentation

## Change management

Change requests and bug reports are are submitted through the [GitHub issue tracker](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/issues). There should be a single issue/bug/feature per ticket.

All changes should be mage on a branch or fork of the `master` branch and the change should be submitted through a GitHub pull request. Pull requests will be reviewed by a repository administrator before being merged into the `master` branch. For changes by the repository administrator, the pull request should be reviewed by another administrator before being merging.

## Building

Instructions on building the firmware an be found in the [Developer Guide](developer-guide.md).

For releases and PR approval the builds are built using the [Build/Release OpenEVSE](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/actions/workflows/build.yaml) workflow to ensure consistent behaviour.

## Testing

> TODO
## Creating a new Releases

1. Ensure GitHub actions are complete and green
[![Build/Release OpenEVSE](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/actions/workflows/build.yaml/badge.svg)](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/actions/workflows/build.yaml)
1. Check the [version number](https://semver.org/) is correct
1. Go to the latest [Development Build](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/releases/tag/latest) release
1. Edit the release
1. Change the tag from latest to the [version number](https://semver.org/), for example: `v1.0.0`
1. Change the branch to `latest`, is not automatically filled in so have to type the name in. Will show the appropriate commit hash on pressing enter
1. Enter the version number as the release name, for example: `v1.0.0`
1. Add the release notes, a good start is to use the `Auto-Generated Release Notes` and edit as needed
1. Remove any unwanted binaries, need at least:
- `openevse_esp32-gateway-e.bin`
- `openevse_huzzah32.bin`
- `openevse_wifi_v1.bin`
- `openevse_esp-wrover-kit`
- `openevse_nodemcu-32s`
1. Unselect the `Pre-release` checkbox
1. Click `Update release`
1. Ensure the release validation action is green
[![Release Validation](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/actions/workflows/release_validation.yaml/badge.svg)](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/actions/workflows/release_validation.yaml)
9 changes: 9 additions & 0 deletions test/config.http
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ Content-Type: application/json
POST {{baseUrl}}/config HTTP/1.1
Content-Type: application/json

{
"mqtt_enabled": false
}

###

POST {{baseUrl}}/config HTTP/1.1
Content-Type: application/json

{
"mqtt_vehicle_soc": "vehicle/soc",
"mqtt_vehicle_range": "vehicle/range",
Expand Down

0 comments on commit a87958d

Please sign in to comment.