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

Ensure html_root_url is kept in sync #754

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@mgeisler
Contributor

mgeisler commented Nov 1, 2017

This adds two new unit tests: one that checks that the html_root_url
attribute always uses the current crate version number, and one that
checks that the TOML code blocks in the README use the correct version
number.

This is implemented by my version-sync crate -- I hope it's useful!

Fixes #613.

@mgeisler

This comment has been minimized.

Show comment
Hide comment
@mgeisler

mgeisler Nov 3, 2017

Contributor

This might be more complicated than I hoped since version-sync doesn't support Rust 1.14 (version 1.15 is the oldest it can be compiled on).

Contributor

mgeisler commented Nov 3, 2017

This might be more complicated than I hoped since version-sync doesn't support Rust 1.14 (version 1.15 is the oldest it can be compiled on).

Ensure html_root_url is kept in sync with crate version
This adds two new unit tests: one that checks that the html_root_url
attribute always uses the current crate version number, and one that
checks that the TOML code blocks in the README use the correct version
number.

This is implemented by my version-sync crate -- I hope it's useful!

Fixes #613.
@mgeisler

This comment has been minimized.

Show comment
Hide comment
@mgeisler

mgeisler Nov 3, 2017

Contributor

Please let me know if there's any interest in the general approach — then I can see about removing the version-sync dependency on versions and targets where it doesn't work (remove with sed in the Travis build).

Contributor

mgeisler commented Nov 3, 2017

Please let me know if there's any interest in the general approach — then I can see about removing the version-sync dependency on versions and targets where it doesn't work (remove with sed in the Travis build).

@carllerche

This comment has been minimized.

Show comment
Hide comment
@carllerche

carllerche Nov 7, 2017

Owner

Thanks for the PR.

I'd rather not add another dependency and instead deal with this by having a RELEASE doc and wait for this to get fixed up stream. But, again, thanks for the attempt :).

Owner

carllerche commented Nov 7, 2017

Thanks for the PR.

I'd rather not add another dependency and instead deal with this by having a RELEASE doc and wait for this to get fixed up stream. But, again, thanks for the attempt :).

@carllerche carllerche closed this Nov 7, 2017

@twmb

This comment has been minimized.

Show comment
Hide comment
@twmb

twmb Nov 8, 2017

As an alternative, I've used

before_install: |
  version=$(grep "^version =" Cargo.toml | sed -r  's/^[^0-9]*([0-9]+.[0-9]+.[0-9]+).*/\1/') &&
  docs_version=$(grep -R 'docs\.rs' src | head -n 1 | sed -r 's/^[^0-9]*([0-9]+.[0-9]+.[0-9]+).*/\1/') &&
  test "$version" == "$docs_version"

in my .travis.yml in the past. This only catches the first mismatch, but it could be cleaned up to catch all mismatches. But, waiting for upstream fixes is 👍 as well.

twmb commented Nov 8, 2017

As an alternative, I've used

before_install: |
  version=$(grep "^version =" Cargo.toml | sed -r  's/^[^0-9]*([0-9]+.[0-9]+.[0-9]+).*/\1/') &&
  docs_version=$(grep -R 'docs\.rs' src | head -n 1 | sed -r 's/^[^0-9]*([0-9]+.[0-9]+.[0-9]+).*/\1/') &&
  test "$version" == "$docs_version"

in my .travis.yml in the past. This only catches the first mismatch, but it could be cleaned up to catch all mismatches. But, waiting for upstream fixes is 👍 as well.

@mgeisler

This comment has been minimized.

Show comment
Hide comment
@mgeisler

mgeisler Nov 10, 2017

Contributor

@carllerche Sure, no problem. Note that it's only a new dev-dependency, so only people who run the MIO tests are affected by this.

I'll see about making another PR that at least fixes the outdated version number :-)

Contributor

mgeisler commented Nov 10, 2017

@carllerche Sure, no problem. Note that it's only a new dev-dependency, so only people who run the MIO tests are affected by this.

I'll see about making another PR that at least fixes the outdated version number :-)

@carllerche

This comment has been minimized.

Show comment
Hide comment
@carllerche

carllerche Nov 10, 2017

Owner

@twmb I think a smoke test like that would be good.

@mgeisler Sure re: PR that fixes the version :)

Owner

carllerche commented Nov 10, 2017

@twmb I think a smoke test like that would be good.

@mgeisler Sure re: PR that fixes the version :)

@mgeisler

This comment has been minimized.

Show comment
Hide comment
@mgeisler

mgeisler Nov 11, 2017

Contributor

I've submitted #760 to fix the version number.

Contributor

mgeisler commented Nov 11, 2017

I've submitted #760 to fix the version number.

@mgeisler mgeisler referenced this pull request Nov 13, 2017

Merged

bump few dependencies #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment