Skip to content

Commit 109fc10

Browse files
committed
fix for nodej12 deprecation warning
1 parent 7cae8b5 commit 109fc10

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

.github/workflows/gen-test-suite.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,12 @@ jobs:
111111
# Avoid multiline: flatten JSON
112112
- id: set-env
113113
run: |
114-
content='${{ toJson(env) }}'
115-
content="${content//'%'/'%25'}"
116-
content="${content//$'\n'/'%0A'}"
117-
content="${content//$'\r'/'%0D'}"
118-
echo "::set-output name=env::$content"
114+
content='${{ toJson(env) }}' # convert env vars to json
115+
content="${content//'%'/'%25'}" # escape percent entities
116+
content="${content//$'\n'/''}" # remove lf
117+
content="${content//$'\r'/''}" # remove cr
118+
echo "env=${content}" >> $GITHUB_OUTPUT
119+
119120
120121
121122
gen_keys:
@@ -165,7 +166,7 @@ jobs:
165166
cat $pub_key_h_path
166167
167168
- name: Upload RootCA/PubKey as artifact
168-
uses: actions/upload-artifact@v2
169+
uses: actions/upload-artifact@v3
169170
with:
170171
name: Certs
171172
path: |
@@ -197,7 +198,7 @@ jobs:
197198
steps:
198199

199200
- name: Checkout Current
200-
uses: actions/checkout@v2
201+
uses: actions/checkout@v3
201202
with:
202203
ref: ${{ github.event.pull_request.head.sha }}
203204

@@ -223,14 +224,14 @@ jobs:
223224
cp ${{env.cert_path}}/pub_key.h $pub_key_c_path
224225
225226
- name: Checkout esp32-flashz
226-
uses: actions/checkout@v2
227+
uses: actions/checkout@v3
227228
with:
228229
repository: vortigont/esp32-flashz
229230
ref: main
230231
path: CustomflashZ # must contain string "Custom"
231232

232233
- name: Checkout ESP32-targz
233-
uses: actions/checkout@v2
234+
uses: actions/checkout@v3
234235
with:
235236
repository: tobozo/ESP32-targz
236237
ref: master
@@ -297,7 +298,7 @@ jobs:
297298
cat firmware.sign ${{env.littlefs_bin_path}} > ${{env.littlefs_signed_bin_path}}
298299
299300
- name: Update TestSuite artifact
300-
uses: actions/upload-artifact@v2
301+
uses: actions/upload-artifact@v3
301302
with:
302303
name: TestSuite
303304
path: |
@@ -315,7 +316,7 @@ jobs:
315316
steps:
316317

317318
- name: Checkout
318-
uses: actions/checkout@v2
319+
uses: actions/checkout@v3
319320
with:
320321
ref: ${{ github.event.pull_request.head.sha }}
321322

@@ -334,14 +335,14 @@ jobs:
334335
# rm ${{env.privkey_path}}
335336
336337
- name: Update TestSuite artifacts with new JSON Manifest
337-
uses: actions/upload-artifact@v2
338+
uses: actions/upload-artifact@v3
338339
with:
339340
name: TestSuite
340341
path: |
341342
${{env.artifact_path}}/**
342343
343344
- name: Delete Cert/Signature/Privkey artifact
344-
uses: geekyeggo/delete-artifact@v1
345+
uses: geekyeggo/delete-artifact@v2
345346
with:
346347
name: Certs
347348

.github/workflows/platformio.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
matrix:
2727
python-version: [3.7]
2828
steps:
29-
- uses: actions/checkout@v1
29+
- uses: actions/checkout@v3
3030
- name: Set up Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v1
31+
uses: actions/setup-python@v4
3232
with:
3333
python-version: ${{ matrix.python-version }}
3434
- name: Install dependencies
@@ -51,7 +51,7 @@ jobs:
5151
lint:
5252
runs-on: ubuntu-latest
5353
steps:
54-
- uses: actions/checkout@v2
54+
- uses: actions/checkout@v3
5555
- uses: arduino/arduino-lint-action@v1
5656
with:
5757
project-type: library

src/esp32FOTA.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ bool esp32FOTA::setupHTTP( const char* url )
299299
const char* rootcastr = nullptr;
300300
_http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
301301

302-
log_i("Connecting to: %s\r\n", url );
302+
log_i("Connecting to: %s", url );
303303
if( String(url).startsWith("https") ) {
304304
if (!_cfg.unsafe) {
305305
if( !_cfg.root_ca ) {
@@ -719,7 +719,6 @@ bool esp32FOTA::execHTTPcheck()
719719
}
720720

721721
log_i("Getting HTTP: %s", useURL.c_str());
722-
log_i("------");
723722

724723
if(! setupHTTP( useURL.c_str() ) ) {
725724
log_e("Unable to setup http, aborting!");
@@ -869,8 +868,8 @@ static int64_t getHTTPStream( esp32FOTA* fota, int partition )
869868
updateSize = fota->getHTTPCLient()->getSize();
870869
contentType = fota->getHTTPCLient()->header( "Content-type" );
871870
String acceptRange = fota->getHTTPCLient()->header( "Accept-Ranges" );
872-
if( !acceptRange.isEmpty() ) {
873-
Serial.printf("This server supports resume! Accept-Ranges: %s\n", acceptRange.c_str() );
871+
if( acceptRange == "bytes" ) {
872+
Serial.println("This server supports resume!" );
874873
} else {
875874
Serial.println("This server does not support resume!" );
876875
}

0 commit comments

Comments
 (0)