Commit Graph

5 Commits

Author SHA1 Message Date
Jia Yue Hua
3ba907211b
[neargye-semver] update to 0.3.1 (#37675) 2024-03-25 15:36:09 -07:00
Justen Di Ruscio
441831b902
[neargye-semver] use find-package support in vcpkg port (#36862)
Originally, this port copied the single header provided by the upstream
into the install destination. This required consumers to use the package
via `find_path(semver.hpp)`, which is less robust, is inconsistent, and
doesn't use targets.

These changes update the vcpkg port to leverage the config-file package
offered by [neargye/semver](https://github.com/Neargye/semver). With
this, consumers use the package through `find_package(neargye-semver
CONFIG), and the target `semver::semver`.

- [x] Changes comply with the [maintainer
guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- ~[ ] SHA512s are updated for each updated download.~
- ~[ ] The "supports" clause reflects platforms that may be fixed by
this new version.~
- ~[ ] Any fixed [CI
baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt)
entries are removed from that file.~
- ~[ ] Any patches that are no longer applied are deleted from the
port's directory.~
- [x] The version database is fixed by rerunning `./vcpkg x-add-version
--all` and committing the result.
- [x] Only one version is added to each modified port's versions file.
2024-02-21 09:28:24 -08:00
JulZimmermann
7db67453b1
[neargye-semver] set license (#28257)
* set version in neargye-semver

* run x-add-version

Co-authored-by: Julian Zimmermann <julian.zimmermann@gti.de>
2022-12-13 19:35:35 -08:00
chausner
3bcdecedb5
[neargye-semver] Update to 0.3.0 (#20916)
* Update neargye-semver to 0.3.0

* Update CI baseline

* Revert back to configure_file

* Update git-tree hash

Co-authored-by: chausner <chausner@users.noreply.github.com>
2021-10-21 22:51:39 -07:00
Billy O'Neal
b295670e4b
Bulk convert control files. (#19986)
```
function Convert-Control {
    Param($full)
    .\vcpkg.exe format-manifest $full
    $root = $full.Substring(0, $full.Length - 7) # CONTROL
    $new = $root + 'vcpkg.json'
    $content = Get-Content -Raw $new
    $asJson = ConvertFrom-Json $content -AsHashtable -Depth 100
    $oldVersion = $asJson['port-version']
    if ($null -eq $oldVersion) {
        $oldVersionFull = $asJson['version-string']
        Write-Host "Got version $oldVersionFull"
        $match = [System.Text.RegularExpressions.Regex]::Match($oldVersionFull, '^(.+)-(\d+)$')
        if ($match.Success -and -not [System.Text.RegularExpressions.Regex]::IsMatch($oldVersionFull, '^\d\d\d\d-\d\d-\d\d$')) {
            $newFullVersion = [string]$match.Groups[1].Value
            $oldVersion = [int]$match.Groups[2].Value
            Write-Host "newFullVersion $newFullVersion oldVersion $oldVersion"
            $newVersion = $oldVersion + 1
            $asJson['version-string'] = $newFullVersion
            Write-Host "Previous version for $full extracted from version field -- setting version-string $newFullVersion and port-version $newVersion"
        } else {
            Write-Host "No previous version for $full -- setting 1"
            $newVersion = 1
        }
    } else {
        $newVersion = [int]$oldVersion + 1
        Write-Host "New version for $full : $newVersion"
    }

    $asJson['port-version'] = $newVersion

    $content = ConvertTo-Json $asJson -Depth 100
    Set-Content -Path $new -Value $content
    .\vcpkg.exe format-manifest $new
}

Get-ChildItem ports\CONTROL -Recurse | Foreach-Object {
    Convert-Control $_.FullName
}

git commit -am "this message"
.\vcpkg.exe x-add-version -all
git commit -a --amend
```
2021-09-09 01:24:04 -07:00