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

.github, fetch-configlet: rename release assets #705

Merged
merged 6 commits into from
Nov 11, 2022

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Nov 5, 2022

Summary:

  • Add version string
  • Delimit with underscore, not hyphen
  • Rename 64bit to x86-64
  • Rename 32bit to i386 (note that we do not have 32-bit releases yet anyway)
  • Rename tgz to tar.gz
  • Rename mac to macos

The configlet release assets have always had architecture-ambiguous names:

configlet-linux-64bit.tgz
configlet-mac-64bit.tgz
configlet-windows-64bit.zip

This naming format is old (added by d4c6e26 in the canonical-data-syncer days), and was ultimately inheirited from:

The ambiguous names haven't mattered much so far, because configlet has only released for x86-64. However, I'm getting closer to adding releases for other 64bit architectures, so we finally need to change the names.

For the rationale being the new naming format, see my (hopefully sufficiently exhaustive) bikeshedding in #363 (comment).

Before this commit, the release assets were named like:

configlet-linux-64bit.tgz
configlet-mac-64bit.tgz
configlet-windows-64bit.zip
configlet_4.0.0-beta.7_checksums_sha256.txt

With this commit, the next release will have assets named:

configlet_4.0.0-beta.8_checksums_sha256.txt
configlet_4.0.0-beta.8_linux_x86-64.tar.gz
configlet_4.0.0-beta.8_macos_x86-64.tar.gz
configlet_4.0.0-beta.8_windows_x86-64.zip

where the archive names now match the naming format for the existing checksums file.

Closes: #363
Refs: #24


I've tried to convince myself that the naming format with underscores everywhere but architecture and version string (where semver mandates a hyphen):

configlet_4.0.0-beta.7_linux_x86-64.tar.gz

is a better format than hyphens everywhere but architecture:

configlet-4.0.0-beta.7-linux-x86_64.tar.gz

or hyphens everywhere:

configlet-4.0.0-beta.7-linux-x86-64.tar.gz

or underscores everywhere possible:

configlet_4.0.0-beta.7_linux_x86_64.tar.gz

Even though I don't love that:

  • It ignores an existing convention that "hyphens separate words, and underscores delimit within a word" (try double clicking on the x86 in x86_64 and x86-64 if you aren't aware of this - the first selects the whole thing, the second doesn't). Note that double-clicking beta in 4.0.0-beta.7 won't select the whole version, and the same is true of 4.0.0_beta.7 even if semver permitted that, so us using underscores everywhere possible doesn't achieve a naming format where double-clicking on part of the name always performs tokenization.
  • uname -m returns x86_64, not x86-64. It is still referred to as x86-64 in plenty of other places (e.g. https://en.wikipedia.org/wiki/X86-64)
  • If we pretend that prerelease versions don't exist, and applications with more than one word don't exist, I probably prefer:
configlet-4.0.0-linux-x86_64.tar.gz

to this PR's:

configlet_4.0.0_linux_x86-64.tar.gz

To allow the fetch-configlet workflow to pass, I have added assets with the new naming format to the configlet 4.0.0-beta.7 release - they're copies of the existing assets, with the same checksums.

Before we create a release that includes this PR, we need to:

  • update the fetch-configlet script used by the org-wide configlet workflow.
  • and create and merge a PR on every track to update the track-level fetch-configlet{.ps1} scripts. We can do this mass PR either:

But for some period of time, we should keep assets with the old naming format in releases. Then an out-of-date fetch-configlet script will continue to work.

We need to distinguish between different 64bit architectures, like
`x86-64` and `arm64`.

Also rename `32bit` to `i386`.

Refs: 24
Refs: 363
Rationale:

- We want to start including the version string in the filenames of
  release assets.

- Configlet uses version strings that are compatible with the semantic
  versioning spec.

- The semantic versioning spec forbids using an underscore, and
  specifies that prerelease versions can use hyphens [1]:

    Section 9:

    A pre-release version MAY be denoted by appending a hyphen and a
    series of dot separated identifiers immediately following the patch
    version. Identifiers MUST comprise only ASCII alphanumerics and
    hyphens [0-9A-Za-z-].
    [...]
    Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92

Therefore, let's work towards asset names like

    some-app_1.0.0-beta.1_linux_x86-64.tar.gz

rather than

    some_app-1.0.0-beta.1-linux-x86_64.tar.gz

because the first is semantically delimited by `_`, but the second is
not semantically delimited by `-` (as the `-beta` part of the version
string is awkward).

[1] https://semver.org/

Refs: 24
Refs: 363
Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

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

With this commit, the next release will have assets named:

Those look good to me.
We can't merge this until we've handled the syncing of the scripts, right?

@ee7
Copy link
Member Author

ee7 commented Nov 9, 2022

We can't merge this until we've handled the syncing of the scripts, right?

We can - it's just that we need to manually add assets with the old names before undrafting the release.

I could have made the build workflow automatically upload the duplicate assets, but:

  1. I'm hoping we won't go many releases without updating the fetch scripts
  2. I think I'd prefer to remove the assets with the old name when the release is no longer the latest one
  3. (Partly continuing from point 2), I think I'd prefer for the checksums file to only reference the newly named assets

I'll also remove the newly named assets from 4.0.0-beta.7 after we release 4.0.0-beta.8.

@ErikSchierboom
Copy link
Member

Okay sure

@ee7 ee7 merged commit 57e6c5f into exercism:main Nov 11, 2022
@ee7 ee7 deleted the rename-release-assets branch November 11, 2022 18:31
@ee7
Copy link
Member Author

ee7 commented Nov 12, 2022

@ee7 wrote:

I'll also remove the newly named assets from 4.0.0-beta.7 after we release 4.0.0-beta.8.

Done.

fetch-configlet only ever fetches assets from the latest release. So the point is that every release will eventually only use one archive naming format, with the checksums file referencing only the assets present, with assets uploaded only by GitHub Actions. Rather than the strange looking:

gh release view -R exercism/configlet \
    --json assets \
    --jq '.assets.[] | {updatedAt,name}' \
    | jq
{
  "name": "configlet-linux-64bit.tgz",
  "updatedAt": "2022-10-27T21:00:06Z"
}
{
  "name": "configlet-mac-64bit.tgz",
  "updatedAt": "2022-10-27T21:00:35Z"
}
{
  "name": "configlet-windows-64bit.zip",
  "updatedAt": "2022-10-27T21:01:34Z"
}
{
  "name": "configlet_4.0.0-beta.7_checksums_sha256.txt",
  "updatedAt": "2022-10-27T21:01:50Z"
}
{
  "name": "configlet_4.0.0-beta.7_linux_x86-64.tar.gz",
  "updatedAt": "2022-11-05T15:34:31Z"
}
{
  "name": "configlet_4.0.0-beta.7_macos_x86-64.tar.gz",
  "updatedAt": "2022-11-05T15:34:31Z"
}
{
  "name": "configlet_4.0.0-beta.7_windows_x86-64.zip",
  "updatedAt": "2022-11-05T15:34:31Z"
}

petertseng pushed a commit to petertseng/exercism-rust that referenced this pull request Nov 17, 2022
Before this commit, the release assets were named like:

    configlet-linux-64bit.tgz
    configlet-mac-64bit.tgz
    configlet-windows-64bit.zip
    configlet_4.0.0-beta.7_checksums_sha256.txt

With this commit, the next release will have assets named:

    configlet_4.0.0-beta.8_checksums_sha256.txt
    configlet_4.0.0-beta.8_linux_x86-64.tar.gz
    configlet_4.0.0-beta.8_macos_x86-64.tar.gz
    configlet_4.0.0-beta.8_windows_x86-64.zip

Where we:

- Make the archive naming format match that of the checksums file
- Add a version string
- Delimit with an underscore, not a hyphen
- Rename `64bit` to `x86-64`
- Rename `32bit` to `i386`
- Rename `tgz` to `tar.gz`
- Rename `mac` to `macos`

So far, we have only released configlet for x86-64, and the release
assets have always had an ambiguous `64bit` in the names. This naming
format was old (added by d4c6e26836a5, 2020-10-09), and was ultimately
inherited from:

- the `exercism/configlet-v2` releases [1]
- the `exercism/cli` releases [2][3]

However, we're getting closer to adding releases for other 64-bit
architectures, so it's especially important to change the names now.

The rationale for the particular use of underscores and hyphens is:

- We want to have the version string in the asset filenames

- Configlet uses version strings that are compatible with the Semantic
  Versioning spec

- It is more common to use hyphens in executable names than
  underscores

- The Semantic Versioning spec forbids using an underscore, and
  specifies that prerelease versions can use hyphens [4]:

      Section 9:

      A pre-release version MAY be denoted by appending a hyphen and a
      series of dot separated identifiers immediately following the patch
      version. Identifiers MUST comprise only ASCII alphanumerics and
      hyphens [0-9A-Za-z-].
      [...]
      Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92

That is, there's an argument for the format of:

    some-app_1.0.0-beta.1_linux_x86-64.tar.gz

rather than:

    some_app-1.0.0-beta.1-linux-x86_64.tar.gz

because `_` fully separates the components of the first, and `-` does
not separate the components of the second (due to the `-beta` part of
the version string). This does ignore the convention of `_` as an
inter-word space, however.

[1] https://github.com/exercism/v2-configlet/releases
[2] exercism/cli#700 (comment)
[3] https://github.com/exercism/cli/releases/tag/v3.0.12
[4] https://semver.org/

Closes: exercism/configlet#363
Refs: exercism/configlet#24
exercism/configlet#705
petertseng pushed a commit to petertseng/exercism-haskell that referenced this pull request Nov 17, 2022
Before this commit, the release assets were named like:

    configlet-linux-64bit.tgz
    configlet-mac-64bit.tgz
    configlet-windows-64bit.zip
    configlet_4.0.0-beta.7_checksums_sha256.txt

With this commit, the next release will have assets named:

    configlet_4.0.0-beta.8_checksums_sha256.txt
    configlet_4.0.0-beta.8_linux_x86-64.tar.gz
    configlet_4.0.0-beta.8_macos_x86-64.tar.gz
    configlet_4.0.0-beta.8_windows_x86-64.zip

Where we:

- Make the archive naming format match that of the checksums file
- Add a version string
- Delimit with an underscore, not a hyphen
- Rename `64bit` to `x86-64`
- Rename `32bit` to `i386`
- Rename `tgz` to `tar.gz`
- Rename `mac` to `macos`

So far, we have only released configlet for x86-64, and the release
assets have always had an ambiguous `64bit` in the names. This naming
format was old (added by d4c6e26836a5, 2020-10-09), and was ultimately
inherited from:

- the `exercism/configlet-v2` releases [1]
- the `exercism/cli` releases [2][3]

However, we're getting closer to adding releases for other 64-bit
architectures, so it's especially important to change the names now.

The rationale for the particular use of underscores and hyphens is:

- We want to have the version string in the asset filenames

- Configlet uses version strings that are compatible with the Semantic
  Versioning spec

- It is more common to use hyphens in executable names than
  underscores

- The Semantic Versioning spec forbids using an underscore, and
  specifies that prerelease versions can use hyphens [4]:

      Section 9:

      A pre-release version MAY be denoted by appending a hyphen and a
      series of dot separated identifiers immediately following the patch
      version. Identifiers MUST comprise only ASCII alphanumerics and
      hyphens [0-9A-Za-z-].
      [...]
      Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92

That is, there's an argument for the format of:

    some-app_1.0.0-beta.1_linux_x86-64.tar.gz

rather than:

    some_app-1.0.0-beta.1-linux-x86_64.tar.gz

because `_` fully separates the components of the first, and `-` does
not separate the components of the second (due to the `-beta` part of
the version string). This does ignore the convention of `_` as an
inter-word space, however.

[1] https://github.com/exercism/v2-configlet/releases
[2] exercism/cli#700 (comment)
[3] https://github.com/exercism/cli/releases/tag/v3.0.12
[4] https://semver.org/

Closes: exercism/configlet#363
Refs: exercism/configlet#24
exercism/configlet#705
petertseng pushed a commit to petertseng/exercism-haskell that referenced this pull request Nov 17, 2022
Before this commit, the release assets were named like:

    configlet-linux-64bit.tgz
    configlet-mac-64bit.tgz
    configlet-windows-64bit.zip
    configlet_4.0.0-beta.7_checksums_sha256.txt

With this commit, the next release will have assets named:

    configlet_4.0.0-beta.8_checksums_sha256.txt
    configlet_4.0.0-beta.8_linux_x86-64.tar.gz
    configlet_4.0.0-beta.8_macos_x86-64.tar.gz
    configlet_4.0.0-beta.8_windows_x86-64.zip

Where we:

- Make the archive naming format match that of the checksums file
- Add a version string
- Delimit with an underscore, not a hyphen
- Rename `64bit` to `x86-64`
- Rename `32bit` to `i386`
- Rename `tgz` to `tar.gz`
- Rename `mac` to `macos`

So far, we have only released configlet for x86-64, and the release
assets have always had an ambiguous `64bit` in the names. This naming
format was old (added by d4c6e26836a5, 2020-10-09), and was ultimately
inherited from:

- the `exercism/configlet-v2` releases [1]
- the `exercism/cli` releases [2][3]

However, we're getting closer to adding releases for other 64-bit
architectures, so it's especially important to change the names now.

The rationale for the particular use of underscores and hyphens is:

- We want to have the version string in the asset filenames

- Configlet uses version strings that are compatible with the Semantic
  Versioning spec

- It is more common to use hyphens in executable names than
  underscores

- The Semantic Versioning spec forbids using an underscore, and
  specifies that prerelease versions can use hyphens [4]:

      Section 9:

      A pre-release version MAY be denoted by appending a hyphen and a
      series of dot separated identifiers immediately following the patch
      version. Identifiers MUST comprise only ASCII alphanumerics and
      hyphens [0-9A-Za-z-].
      [...]
      Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92

That is, there's an argument for the format of:

    some-app_1.0.0-beta.1_linux_x86-64.tar.gz

rather than:

    some_app-1.0.0-beta.1-linux-x86_64.tar.gz

because `_` fully separates the components of the first, and `-` does
not separate the components of the second (due to the `-beta` part of
the version string). This does ignore the convention of `_` as an
inter-word space, however.

[1] https://github.com/exercism/v2-configlet/releases
[2] exercism/cli#700 (comment)
[3] https://github.com/exercism/cli/releases/tag/v3.0.12
[4] https://semver.org/

exercism/configlet#363
exercism/configlet#24
exercism/configlet#705
petertseng pushed a commit to petertseng/exercism-rust that referenced this pull request Nov 17, 2022
Before this commit, the release assets were named like:

    configlet-linux-64bit.tgz
    configlet-mac-64bit.tgz
    configlet-windows-64bit.zip
    configlet_4.0.0-beta.7_checksums_sha256.txt

With this commit, the next release will have assets named:

    configlet_4.0.0-beta.8_checksums_sha256.txt
    configlet_4.0.0-beta.8_linux_x86-64.tar.gz
    configlet_4.0.0-beta.8_macos_x86-64.tar.gz
    configlet_4.0.0-beta.8_windows_x86-64.zip

Where we:

- Make the archive naming format match that of the checksums file
- Add a version string
- Delimit with an underscore, not a hyphen
- Rename `64bit` to `x86-64`
- Rename `32bit` to `i386`
- Rename `tgz` to `tar.gz`
- Rename `mac` to `macos`

So far, we have only released configlet for x86-64, and the release
assets have always had an ambiguous `64bit` in the names. This naming
format was old (added by d4c6e26836a5, 2020-10-09), and was ultimately
inherited from:

- the `exercism/configlet-v2` releases [1]
- the `exercism/cli` releases [2][3]

However, we're getting closer to adding releases for other 64-bit
architectures, so it's especially important to change the names now.

The rationale for the particular use of underscores and hyphens is:

- We want to have the version string in the asset filenames

- Configlet uses version strings that are compatible with the Semantic
  Versioning spec

- It is more common to use hyphens in executable names than
  underscores

- The Semantic Versioning spec forbids using an underscore, and
  specifies that prerelease versions can use hyphens [4]:

      Section 9:

      A pre-release version MAY be denoted by appending a hyphen and a
      series of dot separated identifiers immediately following the patch
      version. Identifiers MUST comprise only ASCII alphanumerics and
      hyphens [0-9A-Za-z-].
      [...]
      Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92

That is, there's an argument for the format of:

    some-app_1.0.0-beta.1_linux_x86-64.tar.gz

rather than:

    some_app-1.0.0-beta.1-linux-x86_64.tar.gz

because `_` fully separates the components of the first, and `-` does
not separate the components of the second (due to the `-beta` part of
the version string). This does ignore the convention of `_` as an
inter-word space, however.

[1] https://github.com/exercism/v2-configlet/releases
[2] exercism/cli#700 (comment)
[3] https://github.com/exercism/cli/releases/tag/v3.0.12
[4] https://semver.org/

exercism/configlet#363
exercism/configlet#24
exercism/configlet#705
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.

build: change release asset names
2 participants