filiph / linkcheck

Fast link checker
https://pub.dartlang.org/packages/linkcheck
MIT License
397 stars 51 forks source link

Integrate cli_pkg, replace Travis by GitHub Actions and upload executables #79

Closed ggrossetie closed 3 years ago

ggrossetie commented 3 years ago

resolves #77

ggrossetie commented 3 years ago

@filiph you can see the result here: https://github.com/Mogztter/linkcheck/runs/2713560742

ggrossetie commented 3 years ago

And here's a release (performed on my fork): https://github.com/Mogztter/linkcheck/releases/tag/2.0.18 🎉

ggrossetie commented 3 years ago

A few notes on release:

filiph commented 3 years ago

That's amazing, thank you!

I'm going to merge this. Can you confirm that the following is true? (I want to add it to the README file.)

### Releasing a new version

1. Commit all your changes, including updates to `CHANGELOG`, 
   and including updating the version number in `pubspec.yaml`
   and `lib/linkcheck.dart`. Let's say your new version number is `3.4.13`.
   That number should be reflected in all three files.
2. Tag the last commit with the same version number.
   The tag starts with the letter `v` and continues with the semver number.
   In our case, it would be `v3.4.13`.
3. Push to `master`.

This will run the GitHub Actions script in `.github/workflows/release.yml`,
building binaries and placing a new release into
[github.com/filiph/linkcheck/releases](https://github.com/filiph/linkcheck/releases).
ggrossetie commented 3 years ago

Looks good.

Tag the last commit with the same version number. The tag starts with the letter v and continues with the semver number. In our case, it would be v3.4.13.

I believe that cli_pkg will create a new release/tag with the version defined in pubspec.yaml. So we might need to remove the prefix v when releasing a new release (and update on.push.tag) or override the pkg.version in the tool/grind.dart to add a v prefix.

Otherwise, I think cli_pkg will create a release/tag named 3.4.13.

In the latter case, cli_pkg might not found the version in the CHANGELOG since we are not using the v prefix.

ggrossetie commented 3 years ago

@filiph Does it make sense? For reference, https://github.com/sass/dart-sass is not using the v prefix.

However, if we do want to keep thev prefix then we need to:

  1. override the pkg.version in the tool/grind.dart to add a v prefix.
  2. use the v prefix in the CHANGELOG (otherwise cli_pkg might be confused)

And, if we do want to drop the v prefix, then we need to update on.push.tag:

https://github.com/filiph/linkcheck/blob/f42a301b4554fb8b02b775354580ba1122e892cb/.github/workflows/release.yml#L6

The release procedure becomes:

  1. Tag the last commit with the same version number. In our case, it would be 3.4.13.

Once this is done, would it be possible to publish a new version? I would love to get the latest changes since v2.0.15+1: https://github.com/filiph/linkcheck/compare/v2.0.15%2B1...master

Thanks!

Let me know if there's anything I can do to make that happen 😃

filiph commented 3 years ago

FWIW, I like the v prefix, and it would be consistent with the git tag history, but I don't have a strong preference.

Would you be able to make either change (v or no-v)?

ggrossetie commented 3 years ago

FWIW, I like the v prefix, and it would be consistent with the git tag history, but I don't have a strong preference.

Me too but I took a closer look at cli_pkg and it seems that it's not currently supported to use a version with a v prefix.

Would you be able to make either change (v or no-v)?

Sure, I will implement the no-v solution 😉

filiph commented 3 years ago

Thank you!

ggrossetie commented 3 years ago

No worries, the follow-up pull request is here: https://github.com/filiph/linkcheck/pull/80