Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NETDB Client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
scc-net
netvs
NETDB Client
Commits
422de693
Verified
Commit
422de693
authored
1 year ago
by
Janis Streib
Browse files
Options
Downloads
Patches
Plain Diff
ADD: add .port version for updates gen/lib util with same api version
parent
47c972b5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#269113
failed
1 year ago
Stage: build
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+5
-0
5 additions, 0 deletions
.gitlab-ci.yml
setup.py
+13
-1
13 additions, 1 deletion
setup.py
with
18 additions
and
1 deletion
.gitlab-ci.yml
+
5
−
0
View file @
422de693
...
...
@@ -33,6 +33,11 @@ stages:
build
:
stage
:
build
script
:
-
mkdir -p latest
-
"
(curl
-sS
--header
'PRIVATE-TOKEN:
${CI_JOB_TOKEN}'
https://${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}/-/jobs/artifacts/${CI_COMMIT_BRANCH}/download?job=build
|
bsdtar
-xf
-
-C
latest)
||
true"
-
test -d latest/dist && export LATEST_UTIL_VERSION $(cd latest/dist; ls *.whl | sed -r 's/.*\+([a-z0-9.]+)-.*/\1/g')
-
test -d latest/dist && export LATEST_API_VERSION $(cd latest/dist; ls *.whl | sed -r 's/netdb_client-([0-9]+\.[0-9]+\.[0-9]+).*/\1/g')
-
test -d latest/dist && export POST_NUM $(cd latest/dist; ls *.whl | sed -r 's/.*\.post([0-9]+).*/\1/g')
-
python3 -m build
-
TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --verbose --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi --skip-existing dist/*
artifacts
:
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
13
−
1
View file @
422de693
...
...
@@ -12,6 +12,10 @@ for v in vers:
if
largest_ver
is
None
or
largest_ver
<
sem_v
:
largest_ver
=
sem_v
latest_previous_util_version
=
os
.
environ
.
get
(
'
LATEST_UTIL_VERSION
'
,
None
)
latest_previous_api_version
=
os
.
environ
.
get
(
'
LATEST_API_VERSION
'
,
None
)
post_version
=
os
.
environ
.
get
(
'
POST_NUM
'
,
None
)
def
get_gen_version
():
ver
=
subprocess
.
run
([
"
pip freeze | grep net_api_generator
"
],
shell
=
True
,
text
=
True
,
check
=
True
,
capture_output
=
True
).
stdout
return
ver
.
split
(
'
@
'
)[
-
1
][:
12
]
...
...
@@ -31,9 +35,17 @@ class APIGenBuild(build_py):
subprocess
.
run
([
'
net-api-generator
'
,
'
python
'
,
f
'
--output-dir=
{
target_dir
}
'
],
check
=
True
,
env
=
environ
)
build_py
.
run
(
self
)
util_version
=
f
'
{
os
.
environ
.
get
(
"
CI_COMMIT_SHORT_SHA
"
,
"
HEAD
"
)
}
.
{
get_gen_version
()
}
'
if
util_version
!=
latest_previous_util_version
&&
str
(
largest_ver
)
==
latest_previous_api_version
:
if
post_version
is
None
:
post_version
=
1
else
:
post_version
=
int
(
post_version
)
+
1
setup
(
name
=
'
netdb_client
'
,
version
=
f
'
{
str
(
largest_ver
)
}{
"
.dev1
"
if
os
.
environ
.
get
(
"
CI_COMMIT_BRANCH
"
,
"
local
"
)
==
"
devel
"
else
""
}
+
{
os
.
environ
.
get
(
"
CI_COMMIT_SHORT_SHA
"
,
"
HEAD
"
)
}
.
{
get_gen
_version
()
}
'
,
version
=
f
'
{
str
(
largest_ver
)
}{
"
.
post
"
+
post_version
if
post_version
is
not
None
elese
""
}{
"
.
dev1
"
if
os
.
environ
.
get
(
"
CI_COMMIT_BRANCH
"
,
"
local
"
)
==
"
devel
"
else
""
}
+
{
util
_version
}
'
,
author
=
'
NETVS-Team <netvs@scc.kit.edu>
'
,
description
=
'
This is a meta package to install the automatically generated NET-API definitions for the currently supported API versions.
'
,
url
=
'
https://git.scc.kit.edu/scc-net/net-suite/netdb-client-lib
'
,
...
...
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