mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 06:47:41 +03:00
d5544ee9c0
Summary: [sl] fix compatibility with PEP 440 Our current versioning schema isn't compatible with PEP 440. Luckily, changing the last `-` to a `+` works. Credit for the idea goes to ZhongRuoyu as mentioned in https://github.com/facebook/sapling/issues/598 Pull Request resolved: https://github.com/facebook/sapling/pull/606 Test Plan: - Ran `sl --version` to verify that it outputted a sane format (got `Sapling 0.2.20230417-165855+6db1e950`) - Verified that this was compliant with PEP 440: https://regex101.com/r/sv6aUZ/1 - Verified that this was compliant with Semver 2.0: https://regex101.com/r/RQsynA/1 - Also, verified that this was still compatible with Homebrew in a similar way to D42006425: ``` $ git --no-pager diff diff --git a/Library/Homebrew/test/version_spec.rb b/Library/Homebrew/test/version_spec.rb index 647fb5dcc..ac35b920a 100644 --- a/Library/Homebrew/test/version_spec.rb +++ b/Library/Homebrew/test/version_spec.rb @@ -841,6 +841,12 @@ describe Version do .to be_detected_from("https://opam.ocaml.org/archives/easy-format.1.0.2+opam.tar.gz") end + specify "sapling-better" do + expect(described_class.create("0.2.20230417-165855")) + .to be_detected_from("https://github.com/facebook/sapling/archive/refs/tags/0.2.20230417-165855+6db1e950.tar.gz") + end + + specify "no extension version" do expect(described_class.create("1.8.12")) .to be_detected_from("https://waf.io/waf-1.8.12") % ``` ``` $ ./bin/brew tests --only version -d -v Randomized with seed 48812 bundle exec parallel_rspec --nice -- -I /Users/sggutier/homebrew/Library/Homebrew/test --seed 48812 --color --require spec_helper --tag ~needs_linux --tag ~needs_network --tag ~needs_ci --tag ~needs_svn -- test/version_spec.rb test/version/parser_spec.rb 2 processes for 2 specs, ~ 1 spec per process ................... ..................................................................................................................... Took 2 seconds ``` --- Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/606). * __->__ https://github.com/facebook/sapling/issues/606 * https://github.com/facebook/sapling/issues/605 Reviewed By: zzl0 Differential Revision: D45072716 Pulled By: sggutier fbshipit-source-id: 6fea731486e8b7ea4606a96b064dc3f724420649 |
||
---|---|---|
.. | ||
create-release.sh | ||
gen_workflows.py | ||
retry.sh | ||
tag-name.sh | ||
verify_release.sh |