Merge remote-tracking branch 'origin/hotfix/3.5.3'
This commit is contained in:
commit
218911c463
@ -55,4 +55,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Parser error if click command contained `}`
|
- Parser error if click command contained `}`
|
||||||
([`#2040`](https://github.com/polybar/polybar/issues/2040))
|
([`#2040`](https://github.com/polybar/polybar/issues/2040))
|
||||||
|
|
||||||
[Unreleased]: https://github.com/polybar/polybar/compare/3.5.2...HEAD
|
## [3.5.3] - 2020-12-23
|
||||||
|
### Build
|
||||||
|
- Don't use `git` when building documentation ([`#2311`](https://github.com/polybar/polybar/issues/2309))
|
||||||
|
### Fixed
|
||||||
|
- Empty color values are no longer treated as invalid and no longer produce an error.
|
||||||
|
|
||||||
|
[Unreleased]: https://github.com/polybar/polybar/compare/3.5.3...HEAD
|
||||||
|
[3.5.3]: https://github.com/polybar/polybar/releases/tag/3.5.3
|
||||||
|
30
doc/conf.py
30
doc/conf.py
@ -13,11 +13,25 @@
|
|||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
|
from pathlib import Path
|
||||||
import datetime
|
import datetime
|
||||||
import subprocess
|
|
||||||
from docutils.nodes import Node
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
from docutils.nodes import Node
|
||||||
from sphinx.domains.changeset import VersionChange
|
from sphinx.domains.changeset import VersionChange
|
||||||
|
import packaging.version
|
||||||
|
|
||||||
|
def get_version(root_path):
|
||||||
|
"""
|
||||||
|
Reads the polybar version from the version.txt at the root of the repo.
|
||||||
|
"""
|
||||||
|
path = Path(root_path) / "version.txt"
|
||||||
|
with open(path, "r") as f:
|
||||||
|
for line in f.readlines():
|
||||||
|
if not line.startswith("#"):
|
||||||
|
return packaging.version.parse(line)
|
||||||
|
|
||||||
|
raise RuntimeError("No version found in {}".format(path))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
@ -50,6 +64,11 @@ else:
|
|||||||
# build folder.
|
# build folder.
|
||||||
doc_path = '@doc_path@'
|
doc_path = '@doc_path@'
|
||||||
|
|
||||||
|
# The version from the version.txt file. Since we are not always first
|
||||||
|
# configured by cmake, we don't necessarily have access to the current version
|
||||||
|
# number
|
||||||
|
version_txt = get_version(Path(doc_path).absolute().parent)
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
@ -213,12 +232,9 @@ class VersionDirective(VersionChange):
|
|||||||
deprecated and adds an unreleased tag to versions that are not yet released
|
deprecated and adds an unreleased tag to versions that are not yet released
|
||||||
"""
|
"""
|
||||||
def run(self) -> List[Node]:
|
def run(self) -> List[Node]:
|
||||||
# If the tag exists 'git rev-parse' will succeed and otherwise fail
|
directive_version = packaging.version.parse(self.arguments[0])
|
||||||
completed = subprocess.run(["git", "rev-parse", self.arguments[0]],
|
|
||||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=doc_path,
|
|
||||||
check=False)
|
|
||||||
|
|
||||||
if completed.returncode != 0:
|
if directive_version > version_txt:
|
||||||
self.arguments[0] += " (unreleased)"
|
self.arguments[0] += " (unreleased)"
|
||||||
|
|
||||||
return super().run()
|
return super().run()
|
||||||
|
@ -225,6 +225,10 @@ chrono::duration<double> config::convert(string&& value) const {
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
rgba config::convert(string&& value) const {
|
rgba config::convert(string&& value) const {
|
||||||
|
if (value.empty()) {
|
||||||
|
return rgba{};
|
||||||
|
}
|
||||||
|
|
||||||
rgba ret{value};
|
rgba ret{value};
|
||||||
|
|
||||||
if (!ret.has_color()) {
|
if (!ret.has_color()) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Polybar version information
|
# Polybar version information
|
||||||
# Update this on every release
|
# Update this on every release
|
||||||
# This is used to create the version string if a git repo is not available
|
# This is used to create the version string if a git repo is not available
|
||||||
3.5.2
|
3.5.3
|
||||||
|
Loading…
Reference in New Issue
Block a user