Skip to content
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

fix(macos): resolve filename conflict and remove nested ZIP structure for DMG #160

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

Ovler-Young
Copy link
Contributor

@Ovler-Young Ovler-Young commented Dec 3, 2024

Context

Recent changes introduced an artifact filename conflict for MacOS ZIP uploads due to incorrect filename handling. Additionally, the current workflow for MacOS DMG files involves nesting them inside a ZIP file, which adds unnecessary complexity and nesting.

Changes Made

  1. Fix MacOS ZIP Upload Filename Conflict:

    • Corrected the artifact filename for MacOS zip uploads to avoid conflicts.
    • Ensured unique and consistent naming conventions for MacOS artifacts.
  2. Remove Nested ZIP Structure for MacOS DMG:

    • Adjusted the workflow to upload MacOS DMG files directly instead of nesting them inside a ZIP.
    • Simplified the artifact structure for easier access and usability.

Resolve CI problem in https://github.com/Losses/rune/actions/runs/12132874788


Impact

  • Users will benefit from consistent and conflict-free artifact uploads.
  • The simplified artifact structure enhances usability and access to the MacOS DMG files.

Summary by Sourcery

Fix filename conflict for MacOS ZIP uploads and simplify the artifact structure by removing the nested ZIP for DMG files in the CI workflow.

Bug Fixes:

  • Resolve filename conflict for MacOS ZIP uploads by correcting artifact naming conventions.

Enhancements:

  • Remove nested ZIP structure for MacOS DMG files to simplify artifact structure and improve usability.

CI:

  • Update CI workflow to directly upload MacOS DMG files without nesting them inside a ZIP.

- Adjusted the workflow to upload MacOS DMG files directly instead of nesting them inside a ZIP.
- Simplified the artifact structure for easier access and usability.
Copy link

sourcery-ai bot commented Dec 3, 2024

Reviewer's Guide by Sourcery

This PR fixes MacOS artifact handling in the CI workflow by restructuring how DMG and ZIP files are named and uploaded. The implementation modifies the build workflow to rename artifacts before upload and simplifies the artifact upload process by removing nested ZIP structures.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Restructured the artifact renaming process in the CI workflow
  • Moved artifact renaming steps before the upload steps instead of after
  • Added dynamic naming that includes commit SHA for workflow dispatch events
  • Removed conditional renaming that only occurred for tagged releases
.github/workflows/build.yml
Modified artifact upload configuration to handle files directly
  • Updated path and name parameters to point to specific files instead of wildcards
  • Added continue-on-error flag for ZIP upload to handle optional ZIP artifacts
  • Changed artifact names to include file extensions (.dmg and .zip)
.github/workflows/build.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Ovler-Young - I've reviewed your changes and found some issues that need to be addressed.

Blocking issues:

  • The path contains a duplicate 'temp_macos' directory which will cause the artifact upload to fail (link)

Overall Comments:

  • The DMG upload path contains a duplicate 'temp_macos' directory ('temp_macos/temp_macos/'). This looks incorrect and should be fixed.
  • Adding 'continue-on-error: true' to the ZIP upload will mask failures silently. Consider removing this unless there's a specific reason for allowing failures.
Here's what I looked at during the review
  • 🔴 General issues: 1 blocking issue
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

.github/workflows/build.yml Outdated Show resolved Hide resolved
- Fixed the duplicate 'temp_macos' directory path in the DMG artifact upload step.
@Losses Losses merged commit 1575475 into Losses:master Dec 3, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants