Merge branch 'master' of github.com:deschler/django-modeltranslation

This commit is contained in:
Sergey Tereschenko 2020-05-01 08:16:07 +03:00
commit 18cdd00f12
6 changed files with 54 additions and 3 deletions

15
.versionrc.json Normal file
View file

@ -0,0 +1,15 @@
{
"host": "github.com",
"owner": "deschler",
"repository": "django-modeltranslation",
"bumpFiles": [
{
"filename": "PKG-INFO",
"updater": "pkg-info-updater.js"
},
{
"filename": "modeltranslation/__init__.py",
"updater": "modeltranslation-version-updater.js"
}
]
}

View file

@ -2,7 +2,19 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## 0.14-0 (2019-11-14)
## [0.15.0](https://github.com/deschler/django-modeltranslation/compare/0.14.4...0.15.0) (2020-04-22)
### Features
* Use poetry as venv manager ([a5b402c](https://github.com/deschler/django-modeltranslation/commit/a5b402c51673a78a1aa160247746695070e08a2f))
* Drop old python versions (<3.6)
### Bug Fixes
* add NewMultilingualManager __eq__() ([205a8f6](https://github.com/deschler/django-modeltranslation/commit/205a8f6c2f411b8b20235bbf89b88d3781919cbd))
## 0.14.0 (2019-11-14)
### Bug Fixes

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: django-modeltranslation
Version: 0.14-4
Version: 0.15.0
Summary: Translates Django models using a registration approach.
Home-page: https://github.com/deschler/django-modeltranslation
Author: Peter Eschler,

View file

@ -0,0 +1,15 @@
const VERSION_REGEX = /^VERSION = \((?<major>\d+), (?<minor>\d+), (?<patch>\d+), '(?<tag>\w+)', (?<tagVer>\d+)\)$/m;
const NEW_VERSION_REGEX = /(?<major>\d+).(?<minor>\d+).(?<patch>\d+)(-(?<tag>\w+).(?<tagVer>\d+))?/;
module.exports.readVersion = function (contents) {
let v = contents.match(VERSION_REGEX).groups;
let version = `${v.major}.${v.minor}.${v.patch}`;
if (v.tag == "final")
return version;
return version + `-${v.tag}.${v.tagVer}`;
}
module.exports.writeVersion = function (contents, version) {
let v = version.match(NEW_VERSION_REGEX).groups;
return contents.replace(VERSION_REGEX, `VERSION = (${v.major}, ${v.minor}, ${v.patch}, '${v.tag || 'final'}', ${v.tagVer || 0})`);
}

View file

@ -3,7 +3,7 @@
Version code adopted from Django development version.
https://github.com/django/django
"""
VERSION = (0, 14, 4, 'final', 0)
VERSION = (0, 15, 0, 'final', 0)
default_app_config = 'modeltranslation.apps.ModeltranslationConfig'

9
pkg-info-updater.js Normal file
View file

@ -0,0 +1,9 @@
const VERSION_REGEX = /^Version: (.*)$/m;
module.exports.readVersion = function (contents) {
return contents.match(VERSION_REGEX)[1];
}
module.exports.writeVersion = function (contents, version) {
return contents.replace(VERSION_REGEX, `Version: ${version}`);
}