Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sec23
korte
pymagglobal
Commits
db6d106b
Commit
db6d106b
authored
May 11, 2021
by
Maximilian Schanner
Browse files
fix quotations
parent
eb1936ae
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
db6d106b
...
...
@@ -52,14 +52,16 @@ upload-job:
-
apt-get install -y -qq curl jq --fix-missing
-
apt-get install -y -qq python3-dev python3-pip
# get the version that is being installed
-
'
export
version=$(grep
-oP
"(?<=__version__
=
).*"
./pymagglobal/__init__.py)
'
-
'
export
version=${version:1:-1}
'
-
'
echo
$version
'
-
export version=$(grep -oP "(?<=__version__ = ).*" ./pymagglobal/__init__.py)
-
export version=${version:1:-1}
-
echo $version
# get the corresponding package id
-
'
export
ID=$(curl
-s
--request
GET
--header
"PRIVATE-TOKEN:
${API_ACCES_TOKEN}"
"https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages"
|
jq
--arg
VERSION
"$version"
--raw-output
".[]
|
if
.version==$VERSION
then
.id
else
null
end"
|
grep
-v
null)'
-
'
echo
$ID'
-
|
export ID=$(curl -s --request GET --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages" | jq --arg VERSION "$version" --raw-output '.[] | if .version==$VERSION then .id else null end' | grep -v null)
-
echo $ID
# remove the package, as we want a new build even if the version number did not change
-
'
curl
--max-time
900
--connect-timeout
120
--request
DELETE
--header
"PRIVATE-TOKEN:
${API_ACCES_TOKEN}"
"https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"'
-
|
curl --max-time 900 --connect-timeout 120 --request DELETE --header "PRIVATE-TOKEN: ${API_ACCES_TOKEN}" "https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"
# install twine
-
pip install twine
# upload
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment