Merge remote-tracking branch 'origin/hotfix/3.5.3'

This commit is contained in:
patrick96 2020-12-23 17:42:12 +01:00
commit 218911c463
No known key found for this signature in database
GPG Key ID: 521E5E03AEBCA1A7
4 changed files with 36 additions and 9 deletions

View File

@ -55,4 +55,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Parser error if click command contained `}`
([`#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

View File

@ -13,11 +13,25 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
from pathlib import Path
import datetime
import subprocess
from docutils.nodes import Node
from typing import List
from docutils.nodes import Node
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 -----------------------------------------------------
@ -50,6 +64,11 @@ else:
# build folder.
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 ---------------------------------------------------
# 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
"""
def run(self) -> List[Node]:
# If the tag exists 'git rev-parse' will succeed and otherwise fail
completed = subprocess.run(["git", "rev-parse", self.arguments[0]],
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=doc_path,
check=False)
directive_version = packaging.version.parse(self.arguments[0])
if completed.returncode != 0:
if directive_version > version_txt:
self.arguments[0] += " (unreleased)"
return super().run()

View File

@ -225,6 +225,10 @@ chrono::duration<double> config::convert(string&& value) const {
template <>
rgba config::convert(string&& value) const {
if (value.empty()) {
return rgba{};
}
rgba ret{value};
if (!ret.has_color()) {

View File

@ -1,4 +1,4 @@
# Polybar version information
# Update this on every release
# This is used to create the version string if a git repo is not available
3.5.2
3.5.3