Skip to content

fix(release): Replace all assets with chinese mirrors #11323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lucasssvaz
Copy link
Collaborator

@lucasssvaz lucasssvaz commented Apr 29, 2025

Description of Change

This pull request makes updates to the .github/scripts/on-release.sh script to improve consistency in URL handling and correct an issue in the upload logic for Chinese-specific pages. These changes ensure proper substitution of URLs and accurate references during the upload process.

Keeping it as draft until assets like this are available:
https://dl.espressif.cn/github_assets/earlephilhower/esp-quick-toolchain/releases/download/3.0.0-gnu12/aarch64-linux-gnu.mklittlefs-c41e51a.200706.tar.gz

URL handling improvements:

  • Updated the sed command to simplify and generalize the substitution of github.com URLs with dl.espressif.cn/github_assets by removing the hardcoded espressif path segment. This change applies to both development and release package JSON files. (.github/scripts/on-release.shL345-R350)

Upload logic corrections:

  • Fixed the git_safe_upload_to_pages calls for Chinese-specific pages ($PACKAGE_JSON_DEV_CN and $PACKAGE_JSON_REL_CN) to use the correct file references, ensuring that the appropriate content is uploaded. (.github/scripts/on-release.shL459-R466)

Copy link
Contributor

github-actions bot commented Apr 29, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello lucasssvaz, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against cd06dd7

@lucasssvaz lucasssvaz marked this pull request as ready for review April 30, 2025 16:45
@lucasssvaz lucasssvaz added the Status: Review needed Issue or PR is awaiting review label Apr 30, 2025
@lucasssvaz lucasssvaz added the Type: Documentation Issue pertains to Documentation of Arduino ESP32 label May 14, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y requested a review from Copilot May 14, 2025 11:20
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates our release process to use Chinese mirror assets and corrects the upload logic for Chinese-specific package files. The changes include:

  • A more generic sed URL substitution in on-release.sh for both development and release package files.
  • The addition of release_append_cn.py to append a “-cn” suffix to version strings.
  • Updates to the installation documentation to guide Chinese users on manual updates.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/en/installing.rst Updated instructions for Chinese users regarding package updates.
.github/scripts/release_append_cn.py New script to append "-cn" to version strings in package JSONs.
.github/scripts/on-release.sh Modified URL substitutions and upload calls to correctly refer to Chinese mirrors.
Comments suppressed due to low confidence (2)

.github/scripts/on-release.sh:345

  • The updated sed command now applies a generic replacement for URLs; please ensure that this pattern does not unintentionally modify URL segments in contexts where only selective substitution is desired.
sed '0,/github\.com\//!s|github\.com/|dl.espressif.cn/github_assets/|g' "$OUTPUT_DIR/$PACKAGE_JSON_DEV" > "$OUTPUT_DIR/$PACKAGE_JSON_DEV_CN"

.github/scripts/release_append_cn.py:21

  • [nitpick] The early return for objects with name 'dfu-util' effectively skips version modifications; consider verifying that no nested version entries under 'dfu-util' require appending the '-cn' suffix.
if obj.get("name") == "dfu-util":

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review needed Issue or PR is awaiting review Type: CI & Testing Type: Documentation Issue pertains to Documentation of Arduino ESP32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants