Skip to content
Snippets Groups Projects
Commit 25ec895e authored by Enrique's avatar Enrique
Browse files

typos in ci and zenodoapi scripts

parent f78073af
No related branches found
No related tags found
No related merge requests found
Pipeline #86012 passed
......@@ -21,9 +21,8 @@ deploy_zenodo:
### 2 - Get the last tag/release of the repository
- export REPOSITORY_NAME=zenodoci
- export REPOSITORY_URL=https://gitlab.in2p3.fr/escape2020/wp3/$REPOSITORY_NAME.git
- export LAST_RELEASE=`git ls-remote --tags --refs --sort="v:refname" $REPOSITORY_URL | tail -n1 | sed 's/.*\///'`
- export REPOSITORY_BASE_URL=https://gitlab.in2p3.fr/escape2020/wp3/$REPOSITORY_NAME
- export LAST_RELEASE=`git ls-remote --tags --refs --sort="v:refname" $REPOSITORY_BASE_URL.git | tail -n1 | sed 's/.*\///'`
### 3 - Download the repository and move it to the build directory
### If no release is found/correctly parsed, the script will download the last commit pushed to the master branch
......@@ -32,11 +31,11 @@ deploy_zenodo:
- >
if [ -z "$LAST_RELEASE" ]; then
echo "No tag / new release found ! - Or error when parsing. Downloading last commit to the repository (master branch) ;"; \
wget -O $REPOSITORY_NAME-master.zip https://gitlab.in2p3.fr/escape2020/wp3/"$REPOSITORY_NAME"/-/archive/master/"$REPOSITORY_NAME"-master.zip; \
wget -O $REPOSITORY_NAME-master.zip "$REPOSITORY_BASE_URL"/-/archive/master/"$REPOSITORY_NAME"-master.zip; \
mv $REPOSITORY_NAME-master.zip ./build
else
echo "$LAST_RELEASE tag / release found !"; \
wget -O $REPOSITORY_NAME-$LAST_RELEASE.zip https://gitlab.in2p3.fr/escape2020/wp3/"$REPOSITORY_NAME"/-/archive/"$LAST_RELEASE"/"$REPOSITORY_NAME"-"$LAST_RELEASE".zip; \
wget -O $REPOSITORY_NAME-$LAST_RELEASE.zip "$REPOSITORY_BASE_URL"/-/archive/"$LAST_RELEASE"/"$REPOSITORY_NAME"-"$LAST_RELEASE".zip; \
mv $REPOSITORY_NAME-$LAST_RELEASE.zip ./build
fi
......
......@@ -26,9 +26,9 @@ class ZenodoAPI:
"""
if sandbox:
zenodo_api_url = "https://sandbox.zenodo.org/api/"
zenodo_api_url = "https://sandbox.zenodo.org/api"
else:
zenodo_api_url = "https://zenodo.org/api/"
zenodo_api_url = "https://zenodo.org/api"
self.zenodo_api_url = zenodo_api_url
self.access_token = access_token
......@@ -138,7 +138,7 @@ class ZenodoAPI:
:return: requests.post answer
"""
url = f"{self.zenodo_api_url}deposit/depositions/{entry_id}/actions/newversion"
url = f"{self.zenodo_api_url}/deposit/depositions/{entry_id}/actions/newversion"
parameters = {'access_token': self.access_token}
return requests.post(url, params=parameters)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment