This package provides a python executable that delivers a path-wide version bump feature. It reads ~/.update-package-version.yml file for root paths from which it should start its recursive package search.
Package versions are updated using these glob patterns by default: - **/Pipfile - **/requirements.txt - requirements/**.txt
Installation
pip install update-package-version
Usage
./upv.py -- --help
# upv.py [CONFIG_FILE_PATH] [CONFIG_FILE_NAME] [CWD]
# upv.py [--config-file-path CONFIG_FILE_PATH] [--config-file-name CONFIG_FILE_NAME] [--cwd CWD]
# You can use update-package-version command
# or upv shortcut
upv find package-name --src 0.0.1
upv find package-name
upv update package-name --src 0.0.1 --trg 1.1.1
# Assumes src == *
upv update package-name --trg 1.1.1
Configuration
######################################
# CONVENIENCE PYTHON PACKAGE ALIASES #
######################################
.RE:
# matches `sample-package` and `sample-package==0.0.1`
.package: &include-package '(?P<package>{package})(?P<sign>\=\=|\<\=|\>\=|\<|\>)?(?P<version>[\-\d\.]+)?'
# matches `sample-package.git@0.0.1`
.git-package: &include-git-package '(?P<package>{package})\.git@(?P<version>[\-\d\.]+)'
.EXCLUDE:
# matches all the lines start with the hash character
.comment: &no-comment '^\s*#.+'
# just aliasing `*include-git-package` to make it more readable across the config file
.git-package: &no-git-package '(?P<package>{package})\.git@(?P<version>[\-\d\.]+)'
########################################
# SOME USEFUL PYTHON PATTERN TEMPLATES #
########################################
.GENERIC-PATTERNS:
# use these lines along with something like `pattern: '**/requirements.txt'`
.generic-requirements-package: &generic-requirements-package
replacer: RegexReplacer
# AND logic is used here
include-patterns: []
# OR logic is used here
match-patterns:
- *include-package
# OR logic is used here
exclude-patterns:
- *no-git-package
- *no-comment
.git-repo-requirements-package: &git-repo-requirements-package
replacer: RegexReplacer
match-patterns:
- *include-git-package
exclude-patterns:
- *no-comment
defaults:
file-patterns: &default-file-patterns
# Generic Pipfile parser
- pattern: '**/Pipfile'
replacer: PipfileReplacer
# an utterly broad glob pattern for everything that looks like a python package file,
# but NOT a .git repo
- pattern: '**/requirements.txt'
<<: *generic-requirements-package
# and this one for .git repo ONLY
- pattern: '**/requirements.txt'
<<: *git-repo-requirements-package
# ... when you love segmentation too much
- pattern: '**/requirements/*.txt'
<<: *generic-requirements-package
- pattern: '**/requirements/*.txt'
<<: *git-repo-requirements-package
origins:
- root: '/tmp/sample-project-group'
file-patterns: *default-file-patterns
on-update:
- echo LOL LOL LOL
- echo COOL COOL COOL
Metadata
Release files for update-package-version 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| update-package-version-0.1.3.tar.gz | 15.2 kB | Without provenance | Details for update-package-version-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| update_package_version-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for update_package_version-0.1.3-py3-none-any.whl |
Total release size: 36.5 kB
Release files / update-package-version-0.1.3.tar.gz
| Download URL | update-package-version-0.1.3.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9748457ca4caf281a502342aba3f2cfc9722c788a424e22e9fbcf1c0a538c9e3
|
|
BLAKE2b-256 checksum How to use checksums |
504d3800220c851cba34d9d0b9871d37b909d2eb2073b3f775b17c2d26ec10aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Release files / update_package_version-0.1.3-py3-none-any.whl
| Download URL | update_package_version-0.1.3-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
17ca7189920c08d6423bac625e8577d6523a71522f7d3093fe7e3874bea235a9
|
|
BLAKE2b-256 checksum How to use checksums |
6773fa3ff06bacb79d518ebdf86f9b6b7d2e8f4f36428e08541ba0cb0e877492
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for update-package-version 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.