Skip to content

Commit dfdd8dc

Browse files
Merge pull request #31 from ESP32Async/ci/update-version.sh
(ci): Add update-version.sh script to prepare a next release
2 parents efaeef4 + a80c113 commit dfdd8dc

File tree

2 files changed

+53
-18
lines changed

2 files changed

+53
-18
lines changed

.github/scripts/update-version.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
#!/bin/bash
3+
# shellcheck disable=SC2002
4+
5+
# fail the script if any command unexpectedly fails
6+
set -e
7+
8+
if [ ! $# -eq 3 ]; then
9+
echo "Bad number of arguments: $#" >&2
10+
echo "usage: $0 <major> <minor> <patch>" >&2
11+
exit 1
12+
fi
13+
14+
re='^[0-9]+$'
15+
if [[ ! $1 =~ $re ]] || [[ ! $2 =~ $re ]] || [[ ! $3 =~ $re ]] ; then
16+
echo "error: Not a valid version: $1.$2.$3" >&2
17+
echo "usage: $0 <major> <minor> <patch>" >&2
18+
exit 1
19+
fi
20+
21+
ASYNCWEBSERVER_VERSION_MAJOR="$1"
22+
ASYNCWEBSERVER_VERSION_MINOR="$2"
23+
ASYNCWEBSERVER_VERSION_PATCH="$3"
24+
ASYNCWEBSERVER_VERSION="$ASYNCWEBSERVER_VERSION_MAJOR.$ASYNCWEBSERVER_VERSION_MINOR.$ASYNCWEBSERVER_VERSION_PATCH"
25+
26+
echo "New AsyncTCP version: $ASYNCWEBSERVER_VERSION"
27+
28+
echo "Updating library.properties..."
29+
cat library.properties | sed "s/version=.*/version=$ASYNCWEBSERVER_VERSION/g" > __library.properties && mv __library.properties library.properties
30+
31+
echo "Updating library.json..."
32+
cat library.json | sed "s/^ \"version\":.*/ \"version\": \"$ASYNCWEBSERVER_VERSION\",/g" > __library.json && mv __library.json library.json
33+
34+
echo "Updating src/AsyncWebServerVersion.h..."
35+
cat src/AsyncWebServerVersion.h | \
36+
sed "s/#define ASYNCWEBSERVER_VERSION_MAJOR.*/#define ASYNCWEBSERVER_VERSION_MAJOR $ASYNCWEBSERVER_VERSION_MAJOR/g" | \
37+
sed "s/#define ASYNCWEBSERVER_VERSION_MINOR.*/#define ASYNCWEBSERVER_VERSION_MINOR $ASYNCWEBSERVER_VERSION_MINOR/g" | \
38+
sed "s/#define ASYNCWEBSERVER_VERSION_PATCH.*/#define ASYNCWEBSERVER_VERSION_PATCH $ASYNCWEBSERVER_VERSION_PATCH/g" > src/__AsyncWebServerVersion.h && mv src/__AsyncWebServerVersion.h src/AsyncWebServerVersion.h
39+
40+
exit 0

README.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Discord Server: [https://discord.gg/X7zpGdyUcY](https://discord.gg/X7zpGdyUcY)
1818

1919
Please see the new links:
2020

21-
- `ESP32Async/ESPAsyncWebServer @ 3.6.2` (ESP32, ESP8266, RP2040)
22-
- `ESP32Async/AsyncTCP @ 3.3.2` (ESP32)
23-
- `ESP32Async/ESPAsyncTCP @ 2.0.0` (ESP8266)
21+
- `ESP32Async/ESPAsyncWebServer` (ESP32, ESP8266, RP2040)
22+
- `ESP32Async/AsyncTCP` (ESP32)
23+
- `ESP32Async/ESPAsyncTCP` (ESP8266)
2424
- `https://github.com/ESP32Async/AsyncTCPSock/archive/refs/tags/v1.0.3-dev.zip` (AsyncTCP alternative for ESP32)
25-
- `khoih-prog/AsyncTCP_RP2040W @ 1.2.0` (RP2040)
25+
- `khoih-prog/AsyncTCP_RP2040W` (RP2040)
2626

2727
Asynchronous HTTP and WebSocket Server Library for ESP32, ESP8266 and RP2040
2828
Supports: WebSocket, SSE, Authentication, Arduino Json 7, File Upload, Static File serving, URL Rewrite, URL Redirect, etc.
@@ -95,21 +95,15 @@ If you are an ESP8266 user and want to help improve current 3.x, you are more th
9595
```ini
9696
lib_compat_mode = strict
9797
lib_ldf_mode = chain
98-
lib_deps = ESP32Async/ESPAsyncWebServer @ 3.6.2
98+
lib_deps = ESP32Async/ESPAsyncWebServer
9999
```
100100

101101
**Dependencies:**
102102

103-
- **ESP32 with AsyncTCP**: `ESP32Async/AsyncTCP @ 3.3.2`
104-
Arduino IDE: [https://github.com/ESP32Async/AsyncTCP#v3.3.2](https://github.com/ESP32Async/AsyncTCP/releases)
105-
103+
- **ESP32 with AsyncTCP**: [`ESP32Async/AsyncTCP`](https://github.com/ESP32Async/AsyncTCP/releases)
106104
- **ESP32 with AsyncTCPSock**: `https://github.com/ESP32Async/AsyncTCPSock/archive/refs/tags/v1.0.3-dev.zip`
107-
108-
- **ESP8266**: `ESP32Async/ESPAsyncTCP @ 2.0.0`
109-
Arduino IDE: [https://github.com/ESP32Async/ESPAsyncTCP#v2.0.0](https://github.com/ESP32Async/ESPAsyncTCP/releases/tag/v2.0.0)
110-
111-
- **RP2040**: `khoih-prog/AsyncTCP_RP2040W @ 1.2.0`
112-
Arduino IDE: [https://github.com/khoih-prog/AsyncTCP_RP2040W#v1.2.0](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases/tag/v1.2.0)
105+
- **ESP8266**: [`ESP32Async/ESPAsyncTCP`](https://github.com/ESP32Async/ESPAsyncTCP/releases)
106+
- **RP2040**: [`khoih-prog/AsyncTCP_RP2040W`](https://github.com/khoih-prog/AsyncTCP_RP2040W/releases)
113107

114108
**AsyncTCPSock**
115109

@@ -119,17 +113,16 @@ AsyncTCPSock can be used instead of AsyncTCP by excluding AsyncTCP from the libr
119113
lib_compat_mode = strict
120114
lib_ldf_mode = chain
121115
lib_deps =
122-
; ESP32Async/AsyncTCP @ 3.3.2
123116
https://github.com/ESP32Async/AsyncTCPSock/archive/refs/tags/v1.0.3-dev.zip
124-
ESP32Async/ESPAsyncWebServer @ 3.6.2
117+
ESP32Async/ESPAsyncWebServer
125118
lib_ignore =
126119
AsyncTCP
127120
ESP32Async/AsyncTCP
128121
```
129122

130123
## Performance
131124

132-
Performance of `ESP32Async/ESPAsyncWebServer @ 3.6.2`:
125+
Performance of `ESP32Async/ESPAsyncWebServer`:
133126

134127
```bash
135128
> brew install autocannon
@@ -193,7 +186,7 @@ Read #165 thread, it might give you some hints.
193186
`CONFIG_ASYNC_TCP_RUNNING_CORE` - CPU core thread affinity that runs the queue events handling and executes server callbacks. Default is ANY core, so it means that for dualcore SoCs both cores could handle server activities. If your server's code is too heavy and unoptimized or you see that sometimes
194187
server might affect other network activities, you might consider to bind it to the same core that runs Arduino code (1) to minimize affect on radio part. Otherwise you can leave the default to let RTOS decide where to run the thread based on priority
195188

196-
`CONFIG_ASYNC_TCP_STACK_SIZE` - stack size for the thread that runs sever events and callbacks. Default is 16k that is a way too much waste for well-defined short async code or simple static file handling. You might want to cosider reducing it to 4-8k to same RAM usage. If you do not know what this is or not sure about your callback code demands - leave it as default, should be enough even for very hungry callbacks in most cases.
189+
`CONFIG_ASYNC_TCP_STACK_SIZE` - stack size for the thread that runs sever events and callbacks. Default is 16k that is a way too much waste for well-defined short async code or simple static file handling. You might want to cosider reducing it to 4-8k to same RAM usage. If you do not know what this is or not sure about your callback code demands - leave it as default, should be enough even for very hungry callbacks in most cases.
197190

198191
> [!NOTE]
199192
> This relates to ESP32 only, ESP8266 uses different ESPAsyncTCP lib that does not has this build options
@@ -336,7 +329,9 @@ myHandler.addMiddleware(&authMiddleware); // add authentication to a specific ha
336329
These callbacks are also not triggering the whole middleware chain since they are not part of the request processing workflow (they are not the final handler).
337330

338331
## Original Documentation
332+
339333
<!-- no toc -->
334+
340335
- [Why should you care](#why-should-you-care)
341336
- [Important things to remember](#important-things-to-remember)
342337
- [Principles of operation](#principles-of-operation)

0 commit comments

Comments
 (0)