mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-27 04:34:59 +01:00
Use hyphens for multiple Chocolatey prerelease components
This way 1.0.0-beta.1.1 won't conflict with 1.0.0-beta.11, for example.
This commit is contained in:
parent
d8336622a0
commit
01e768c885
@ -283,7 +283,17 @@ String _chocolateyVersion() {
|
||||
var components = _version.split("-");
|
||||
if (components.length == 1) return components.first;
|
||||
assert(components.length == 2);
|
||||
return "${components.first}-${components.last.replaceAll('.', '')}";
|
||||
|
||||
var first = true;
|
||||
var prerelease = components.last.replaceAllMapped('.', (_) {
|
||||
if (first) {
|
||||
first = false;
|
||||
return '';
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
});
|
||||
return "${components.first}-$prerelease";
|
||||
}
|
||||
|
||||
/// Returns the contents of the `properties.psmdcp` file, computed from the
|
||||
|
Loading…
Reference in New Issue
Block a user