Skip to content

Commit a87958d

Browse files
Process documentation (#300)
Adding documentation of the various development processes. Co-authored-by: Glyn Hudson <[email protected]>
1 parent 14619fe commit a87958d

File tree

3 files changed

+120
-0
lines changed

3 files changed

+120
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Release Validation
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
- prereleased
8+
- edited
9+
10+
jobs:
11+
gui_validation:
12+
name: Pre-built GUI Validation
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
with:
17+
submodules: recursive
18+
19+
### Check the pre-built GUI files are up-to-date
20+
21+
- name: Set up Node JS
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: '12'
25+
26+
- name: Install dependencies
27+
run: |
28+
cd gui
29+
npm install
30+
31+
- name: Build GUI
32+
run: |
33+
cd gui
34+
npm run build
35+
36+
- name: Check the pre-built GUI files are up-to-date
37+
run: |
38+
set +e
39+
git status -s | grep " M "
40+
if [ $? -eq 0 ]; then
41+
echo "ERROR: The pre-built GUI files are not up-to-date"
42+
exit 1
43+
fi
44+
45+
release_number:
46+
name: Release Number Validation
47+
runs-on: ubuntu-latest
48+
if: github.ref_name != 'latest'
49+
50+
steps:
51+
### Check the version number in the code matches the tag number
52+
- name: Retrieve the version number(s)
53+
run: |
54+
TAG_VERSION=$(sed "s/^v//" <<< $GITHUB_REF_NAME)
55+
CODE_VERSION=$(grep BUILD_TAG platformio.ini | awk -F= '{print $NF}')
56+
echo TAG_VERSION=$TAG_VERSION >> $GITHUB_ENV
57+
echo CODE_VERSION=$CODE_VERSION >> $GITHUB_ENV
58+
59+
- name: Check the version numberis semver compliant
60+
run: |
61+
if ! [[ $TAG_VERSION =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-z]*[0-9]+)?$ ]]; then
62+
echo "ERROR: The version number is not semver compliant"
63+
exit 1
64+
fi
65+
66+
- name: Check the version number in the code matches the tag number
67+
run: |
68+
if [ "$TAG_VERSION" != "$CODE_VERSION" ]; then
69+
echo "ERROR: The version number in the code ($CODE_VERSION) does not match the tag number ($TAG_VERSION)"
70+
exit 1
71+
fi
72+

docs/process.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# OpenEVSE Process Documentation
2+
3+
## Change management
4+
5+
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.
6+
7+
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.
8+
9+
## Building
10+
11+
Instructions on building the firmware an be found in the [Developer Guide](developer-guide.md).
12+
13+
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.
14+
15+
## Testing
16+
17+
> TODO
18+
19+
## Creating a new Releases
20+
21+
1. Ensure GitHub actions are complete and green
22+
[![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)
23+
1. Check the [version number](https://semver.org/) is correct
24+
1. Go to the latest [Development Build](https://github.com/OpenEVSE/ESP32_WiFi_V4.x/releases/tag/latest) release
25+
1. Edit the release
26+
1. Change the tag from latest to the [version number](https://semver.org/), for example: `v1.0.0`
27+
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
28+
1. Enter the version number as the release name, for example: `v1.0.0`
29+
1. Add the release notes, a good start is to use the `Auto-Generated Release Notes` and edit as needed
30+
1. Remove any unwanted binaries, need at least:
31+
- `openevse_esp32-gateway-e.bin`
32+
- `openevse_huzzah32.bin`
33+
- `openevse_wifi_v1.bin`
34+
- `openevse_esp-wrover-kit`
35+
- `openevse_nodemcu-32s`
36+
1. Unselect the `Pre-release` checkbox
37+
1. Click `Update release`
38+
1. Ensure the release validation action is green
39+
[![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)

test/config.http

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ Content-Type: application/json
101101
POST {{baseUrl}}/config HTTP/1.1
102102
Content-Type: application/json
103103

104+
{
105+
"mqtt_enabled": false
106+
}
107+
108+
###
109+
110+
POST {{baseUrl}}/config HTTP/1.1
111+
Content-Type: application/json
112+
104113
{
105114
"mqtt_vehicle_soc": "vehicle/soc",
106115
"mqtt_vehicle_range": "vehicle/range",

0 commit comments

Comments
 (0)