Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
my-arithmetic-tpuser
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Randrianarisona Aaron
my-arithmetic-tpuser
Commits
3489c033
Commit
3489c033
authored
1 year ago
by
Randrianarisona Aaron
Browse files
Options
Downloads
Patches
Plain Diff
updated README.md
parent
664084c6
No related branches found
Branches containing commit
Tags
v1.0.3
Tags containing commit
No related merge requests found
Pipeline
#39213
failed with stages
Stage: test
Stage: release
in 9 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+8
-31
8 additions, 31 deletions
README.md
with
8 additions
and
31 deletions
README.md
+
8
−
31
View file @
3489c033
...
...
@@ -126,9 +126,12 @@ run tests:
## poetry-dynamic-versioning configuration
-
pour ajouter le plugin poetry-dynamic-versioning au projet:
-
pour ajouter le plugin poetry-dynamic-versioning au projet
et le verifier
:
```
sudo poetry self add "poetry-dynamic-versioning[plugin]"
sudo poetry self add "poetry-dynamic-versioning[plugin]"
pip install poetry-dynamic-versioning
poetry self show
poetry dynamic-versioning --help
```
À ajouter dans pyproject.toml :
...
...
@@ -137,40 +140,14 @@ sudo poetry self add "poetry-dynamic-versioning[plugin]"
enable = true
[build-system]
requires = ["poetry-core>=1.
2
", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
requires = ["poetry-core>=1.
3
", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
```
pour specifier le pattern à utiliser pour le numéro de version , dans pyproject.toml:
```
[build-system]
pattern = """(?x) (?# ignore whitespace)
^v?((?P<epoch>\\d+)!)?(?P<base>\\d+(\\.\\d+)*) (?# 1.2.3 or 1!2000.1.2)
([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\\d+)?))? (?# b0)
(\\+(?P<tagged_metadata>.+))?$ (?# +linux)
"""
# version format
format-jinja = """
{%- set epoch = epoch if epoch|length else none -%}
{%- if distance == 0 -%}
{{- serialize_pep440(base, stage, revision, epoch=epoch) -}}
{%- elif stage is not none -%}
{{- serialize_pep440(base, stage, revision if revision else 0, epoch=epoch, post=distance, dev=0, metadata=[commit]) -}}
{%- elif branch.startswith('main/') -%}
{{- serialize_pep440(branch['hotfix/' | length:], 'a', 0, epoch=epoch, dev=distance, metadata=[commit]) -}}
{%- elif branch.startswith('hotfix/') -%}
{{- serialize_pep440(branch['hotfix/' | length:], 'a', 0, epoch=epoch, dev=distance, metadata=[commit]) -}}
{%- elif branch.startswith('release/') -%}
{{- serialize_pep440(branch['release/' | length:], 'a', 0, epoch=epoch, dev=distance, metadata=[commit]) -}}
{%- elif branch.startswith('feature/') -%}
{{- serialize_pep440(base, stage, revision, epoch=epoch, post=distance, dev=0, metadata=[branch_escaped['feature' | length:][:16], commit]) -}}
{%- else -%}
{{- serialize_pep440(base, stage, revision, epoch=epoch, post=distance, dev=0, metadata=[commit]) -}}
{%- endif -%}
"""
```
sur gitlab, les tags doit etre de la forme "v1.0.0", en commençant par un "v"
Puis pour le build et obtenir le dossier dist:
```
poetry install
poetry build
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment