Skip to content

Can't release both Mac and Windows zip files #123

@smee30

Description

@smee30

When publishing a release that contains zip files for more than one platform, only one of them will be published. The first set to be released wins: so if I release the Windows version first, then when I come to release the Mac version there is already a release zip file and no Mac zip file will be released. This means upgrades now fail on Mac.

The issue seems to be that this method in BaseDriver.ts:

  /**
   * This method compares to file names to determine if they are technically the same
   * file in the context of a single version/platform/arch combination.  This is used
   * to ensure we never upload two -full.nupkg files to a single version, or two .dmg
   * files.
   * 
   * @param file1 The name of the first file
   * @param file2 The name of the second file
   */
  protected isInherentlySameFile(file1: string, file2: string) {
    for (const suffix of IDENTIFYING_SUFFIXES) {
      if (file1.endsWith(suffix) && file2.endsWith(suffix)) {
        return true;
      }
    }
    return false;
  }

This falsely concludes that just because both are zip files, they are 'inherently the same file' leading the first one to win and the second one to be discarded. It should check additional parts of the filename to match platform strings.

Workaround: Always release the Mac files first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions