Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8352caf

Browse filesBrowse files
authored
Merge branch 'master' into release/v3.1.x
2 parents 57518b8 + 77d8095 commit 8352caf
Copy full SHA for 8352caf

File tree

Expand file treeCollapse file tree

1 file changed

+2
-64
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-64
lines changed

‎.github/scripts/on-release.sh

Copy file name to clipboardExpand all lines: .github/scripts/on-release.sh
+2-64Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -273,68 +273,6 @@ echo "Package Uploaded"
273273
echo "Download URL: $PACKAGE_URL"
274274
echo
275275

276-
##
277-
## LIBS PACKAGE ZIP
278-
##
279-
280-
LIBS_PROJ_NAME="esp32-arduino-libs"
281-
LIBS_PKG_DIR="$OUTPUT_DIR/$LIBS_PROJ_NAME"
282-
LIBS_PACKAGE_ZIP="$LIBS_PROJ_NAME-$RELEASE_TAG.zip"
283-
284-
# Get the libs package URL from the template
285-
LIBS_PACKAGE_SRC_ZIP="$OUTPUT_DIR/src-$LIBS_PROJ_NAME.zip"
286-
LIBS_PACKAGE_SRC_URL=`cat $PACKAGE_JSON_TEMPLATE | jq -r ".packages[0].tools[] | select(.name==\"$LIBS_PROJ_NAME\") | .systems[0].url"`
287-
288-
# Download the libs package
289-
echo "Downloading the libs archive ..."
290-
curl -o "$LIBS_PACKAGE_SRC_ZIP" -LJO --url "$LIBS_PACKAGE_SRC_URL" || exit 1
291-
292-
# Extract the libs package
293-
echo "Extracting the archive ..."
294-
unzip -q -d "$OUTPUT_DIR" "$LIBS_PACKAGE_SRC_ZIP" || exit 1
295-
EXTRACTED_DIR=`ls "$OUTPUT_DIR" | grep "^$LIBS_PROJ_NAME"`
296-
mv "$OUTPUT_DIR/$EXTRACTED_DIR" "$LIBS_PKG_DIR" || exit 1
297-
298-
# Remove unnecessary files in the package folder
299-
echo "Cleaning up folders ..."
300-
find "$LIBS_PKG_DIR" -name '*.DS_Store' -exec rm -f {} \;
301-
find "$LIBS_PKG_DIR" -name '*.git*' -type f -delete
302-
303-
# Compress package folder
304-
echo "Creating ZIP ..."
305-
pushd "$OUTPUT_DIR" >/dev/null
306-
zip -qr "$LIBS_PACKAGE_ZIP" "$LIBS_PROJ_NAME"
307-
if [ $? -ne 0 ]; then echo "ERROR: Failed to create $LIBS_PACKAGE_ZIP ($?)"; exit 1; fi
308-
309-
# Calculate SHA-256
310-
echo "Calculating SHA sum ..."
311-
LIBS_PACKAGE_PATH="$OUTPUT_DIR/$LIBS_PACKAGE_ZIP"
312-
LIBS_PACKAGE_SHA=`shasum -a 256 "$LIBS_PACKAGE_ZIP" | cut -f 1 -d ' '`
313-
LIBS_PACKAGE_SIZE=`get_file_size "$LIBS_PACKAGE_ZIP"`
314-
popd >/dev/null
315-
rm -rf "$LIBS_PKG_DIR"
316-
echo "'$LIBS_PACKAGE_ZIP' Created! Size: $LIBS_PACKAGE_SIZE, SHA-256: $LIBS_PACKAGE_SHA"
317-
echo
318-
319-
# Upload package to release page
320-
echo "Uploading libs package to release page ..."
321-
LIBS_PACKAGE_URL=`git_safe_upload_asset "$LIBS_PACKAGE_PATH"`
322-
echo "Libs Package Uploaded"
323-
echo "Libs Download URL: $LIBS_PACKAGE_URL"
324-
echo
325-
326-
# Construct JQ argument with libs package data
327-
libs_jq_arg="\
328-
(.packages[0].tools[] | select(.name==\"$LIBS_PROJ_NAME\")).systems[].url = \"$LIBS_PACKAGE_URL\" |\
329-
(.packages[0].tools[] | select(.name==\"$LIBS_PROJ_NAME\")).systems[].archiveFileName = \"$LIBS_PACKAGE_ZIP\" |\
330-
(.packages[0].tools[] | select(.name==\"$LIBS_PROJ_NAME\")).systems[].size = \"$LIBS_PACKAGE_SIZE\" |\
331-
(.packages[0].tools[] | select(.name==\"$LIBS_PROJ_NAME\")).systems[].checksum = \"SHA-256:$LIBS_PACKAGE_SHA\""
332-
333-
# Update template values for the libs package and store it in the build folder
334-
cat "$PACKAGE_JSON_TEMPLATE" | jq "$libs_jq_arg" > "$OUTPUT_DIR/package-$LIBS_PROJ_NAME.json"
335-
# Overwrite the template location with the newly edited one
336-
PACKAGE_JSON_TEMPLATE="$OUTPUT_DIR/package-$LIBS_PROJ_NAME.json"
337-
338276
##
339277
## TEMP WORKAROUND FOR RV32 LONG PATH ON WINDOWS
340278
##
@@ -350,8 +288,8 @@ rvtc_jq_arg="\
350288
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
351289
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
352290
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\""
353-
cat "$PACKAGE_JSON_TEMPLATE" | jq "$rvtc_jq_arg" > "$OUTPUT_DIR/package-$LIBS_PROJ_NAME-rvfix.json"
354-
PACKAGE_JSON_TEMPLATE="$OUTPUT_DIR/package-$LIBS_PROJ_NAME-rvfix.json"
291+
cat "$PACKAGE_JSON_TEMPLATE" | jq "$rvtc_jq_arg" > "$OUTPUT_DIR/package-rvfix.json"
292+
PACKAGE_JSON_TEMPLATE="$OUTPUT_DIR/package-rvfix.json"
355293

356294
##
357295
## PACKAGE JSON

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.