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

content: Modify install tag checkout to avoid selecting beta releases #1275

Closed

Conversation

digitalcircuit
Copy link

In short

  • Modify install.md's guidance to select a non-beta Git tag
    • Without this change, new users are guided to install Mastodon v4.2.0-beta1
    • Requires grep support for Perl regular expressions, already in Ubuntu
Criteria Rank Reason
Impact ★★☆ 2/3 Avoids guiding new Mastodon users to beta releases
Risk ★☆☆ 1/3 On other systems, grep may not support Perl regexp
Intrusiveness ★☆☆ 1/3 Small set of changes, shouldn't interfere with other pull requests

Details

The Mastodon installation guide avoids encouraging installing the release candidate (rc) builds of Mastodon, so it should probably avoid the beta (beta) builds as well.

The most straightforward option is adding a capturing group, (rc|beta).

Alternatively, to avoid Perl regular expressions, two grep commands could be chained together:

git tag -l | grep -v 'rc[0-9]*$' | grep -v 'beta[0-9]*$' | sort -V | tail -n 1

Testing

Steps

  1. Clone the Mastodon source code
# Enter a fresh directory
cd "$(mktemp -d)"
# Get code
git clone "https://github.com/mastodon/mastodon.git"
# Enter directory
cd "mastodon"
  1. Run the current tag selection command, observe output
git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1
  1. Run the new tag selection command, observe output
git tag -l | grep -v -P '(rc|beta)[0-9]*$' | sort -V | tail -n 1

Results

The current command selects the current beta release:

v4.2.0-beta1
# git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1

The new command selects the latest stable release:

v4.1.6
# git tag -l | grep -v -P '(rc|beta)[0-9]*$' | sort -V | tail -n 1

Modify the install.md git tag checkout to avoid selecting "beta" tags
as well.  This avoids new folks installing a beta version of Mastodon,
only to skip all fixes in rc builds until stable release.

Alternative if avoiding Perl regexp:
git tag -l | grep -v 'rc[0-9]*$' | grep -v 'beta[0-9]*$' | sort -V | tail -n 1
@vercel
Copy link

vercel bot commented Aug 9, 2023

@digitalcircuit is attempting to deploy a commit to the Mastodon Team on Vercel.

A member of the Team first needs to authorize it.

digitalcircuit added a commit to digitalcircuit/salt-mastodon that referenced this pull request Aug 21, 2023
Update setup-mastodon.sh to avoid picking beta versions as well as
avoiding release candidate (rc) versions.

See mastodon/documentation#1275
@tonytx05
Copy link

Agreed this change is needed to prevent checking out beta versions.

Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@vmstan
Copy link
Sponsor Contributor

vmstan commented Nov 29, 2023

#1316 changes the command to exclude beta and rc releases another way. Closing as completed.

@vmstan vmstan closed this Nov 29, 2023
@digitalcircuit digitalcircuit deleted the fix-install-version-tag branch November 29, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants