Skip to content

Commit

Permalink
Release 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
goerz committed Sep 22, 2023
1 parent ab545a6 commit a6fe255
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,71 @@ jobs:
write(stdout, out)
exit(1)
end'
- name: Version check
run: |
julia -e '
using Pkg
Pkg.develop(path=".")
VERSION = Pkg.dependencies()[Base.UUID("daee34ce-89f3-4625-b898-19384cb65244")].version
BRANCH = ENV["GITHUB_REF_NAME"]
if startswith(BRANCH, "release-")
if (length(VERSION.prerelease) == length(VERSION.build))
println("Version $VERSION on relase branch OK")
else
@error "Invalid version $VERSION on release branch"
exit(1)
end
elseif BRANCH != "master"
if ("dev" in VERSION.prerelease) || ("dev" in VERSION.build)
println("Version $VERSION OK with dev-suffix")
else
@error "Invalid version $VERSION on branch: must contain dev suffix"
exit(1)
end
end
exit(0)'
- name: Changelog check
run: |
julia -e '
using Pkg
Pkg.develop(path=".")
using Dates
VERSION = Pkg.dependencies()[Base.UUID("daee34ce-89f3-4625-b898-19384cb65244")].version
BRANCH = ENV["GITHUB_REF_NAME"]
CHANGELOG = read("NEWS.md", String)
TODAY = string(Dates.today())
if ("dev" in VERSION.prerelease) || ("dev" in VERSION.build)
if !contains(CHANGELOG, "## [Unreleased][]")
@error "NEWS.md for dev-version must contain Unreleased heading"
exit(1)
end
end
if startswith(BRANCH, "release-")
if contains(CHANGELOG, "## [Unreleased][]")
@error "NEWS.md for releases must not contain Unreleased heading"
exit(1)
end
release_header = "## [Version $VERSION][$VERSION] - $TODAY"
if !contains(CHANGELOG, release_header)
@error "NEWS.md must contain release header $(repr(release_header))"
exit(1)
end
rx_release_link = Regex(replace("[$VERSION]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v(\\d.\\d.\\d)...v$VERSION", "."=>"\\.", "[" => "\\[", "]" => "\\]"))
release_link = match(rx_release_link, CHANGELOG)
if isnothing(release_link)
@error "NEWS.md must contain a link for the release $VERSION"
exit(1)
else
previous_version = VersionNumber(release_link.captures[1])
if previous_version >= VERSION
@error "The release link $(repr(release_link.match)) must compare the range from the previous version, not $(previous_version)"
exit(1)
end
end
unreleased_link = "[Unreleased]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v$VERSION...HEAD"
if !contains(CHANGELOG, unreleased_link)
@error "NEWS.md must contain link for future unreleased changes $(repr(unreleased_link)) (but no Unreleased header)"
exit(1)
end
end
exit(0)'
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased][]
## [Version 1.2.1][1.2.1] - 2023-09-22

### Fixed

Expand Down Expand Up @@ -75,6 +75,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0


[Unreleased]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.2.0...HEAD
[1.2.1]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.2.0...v1.2.1
[1.2.0]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/JuliaDocs/DocumenterCitations.jl/compare/v0.2.12...v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "DocumenterCitations"
uuid = "daee34ce-89f3-4625-b898-19384cb65244"
authors = ["Michael Goerz <[email protected]>"]
version = "1.2.1-dev"
version = "1.2.1"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down

0 comments on commit a6fe255

Please sign in to comment.