Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jean-Baptiste Delisle
samsam
Commits
5cda92b8
Commit
5cda92b8
authored
Aug 04, 2021
by
Jean-Baptiste Delisle
Browse files
Deploy on pypi
parent
2e281326
Pipeline
#29052
passed with stages
in 7 minutes and 29 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
5cda92b8
...
...
@@ -73,6 +73,10 @@ Release and deploy on Production:
-
git config --global user.name 'Gitlab CI'
-
git config --global user.email ''
-
git remote set-url origin "https://gitlab-ci-token:$RELEASE_TOKEN@gitlab.unige.ch/jean-baptiste.delisle/samsam.git"
-
export PATH=$PATH:$PWD/../miniconda/bin/
-
source $PWD/../miniconda/etc/profile.d/conda.sh
-
conda env create -f samsam_env.yml
-
conda activate samsam
script
:
# Tag
-
VERSION=`grep __version__ samsam/__info__.py | sed 's/.*version__ = "//' | sed 's/"//'`
...
...
@@ -82,10 +86,12 @@ Release and deploy on Production:
-
CHANGES=`cat CHANGES.txt`
# Add release on gitlab (via gitlab API)
-
curl -X POST -H "PRIVATE-TOKEN:$RELEASE_TOKEN" -F "name=Release samsam $TAG_VERSION" -F "tag_name=$TAG_VERSION" -F "ref=$TAG_VERSION" -F "description=Changes:$CHANGES" 'https://gitlab.unige.ch/api/v4/projects/4476/releases'
# Deploy on
production
# Deploy on
https://obswww.unige.ch/~delisle/
-
cp dist/*.tar.gz /www/people/delisle/public/samsam
-
rm -rf /www/people/delisle/public/samsam/doc/*
-
cp -R doc/build/html/* /www/people/delisle/public/samsam/doc
# Deploy on Pypi
-
python -m twine upload dist/*.tar.gz
# Upgrade to next version
-
MAJOR_DIGIT=`echo $VERSION | awk -F. '{print $1}'`
-
MINOR_DIGIT=`echo $VERSION | awk -F. '{print $2}'`
...
...
@@ -98,4 +104,7 @@ Release and deploy on Production:
-
git add samsam/__info__.py
-
git commit -m "Upgrade project to next version $NEW_VERSION"
-
git push origin master --quiet
after_script
:
-
conda deactivate
-
conda env remove -n samsam
when
:
manual
samsam/__info__.py
View file @
5cda92b8
...
...
@@ -23,4 +23,4 @@ __author__ = 'Jean-Baptiste Delisle'
__author_email__
=
'jean-baptiste.delisle@unige.ch'
__license__
=
'GPLv3'
__url__
=
'https://gitlab.unige.ch/jean-baptiste.delisle/samsam'
__version__
=
"
0.1.3
"
__version__
=
"
1.0.0
"
samsam_env.yml
View file @
5cda92b8
...
...
@@ -10,4 +10,5 @@ dependencies:
-
numpydoc
-
matplotlib
-
ipython
-
corner
\ No newline at end of file
-
corner
-
twine
setup.py
View file @
5cda92b8
...
...
@@ -25,6 +25,8 @@ path = os.path.abspath(os.path.dirname(__file__))
info
=
{}
with
open
(
os
.
path
.
join
(
path
,
'samsam'
,
'__info__.py'
),
'r'
)
as
f
:
exec
(
f
.
read
(),
info
)
with
open
(
'README.rst'
,
'r'
,
encoding
=
'utf-8'
)
as
readme
:
long_description
=
readme
.
read
()
setup
(
name
=
info
[
'__title__'
],
version
=
info
[
'__version__'
],
...
...
@@ -32,6 +34,7 @@ setup(name=info['__title__'],
author_email
=
info
[
'__author_email__'
],
license
=
info
[
'__license__'
],
description
=
info
[
'__description__'
],
long_description
=
long_description
,
url
=
info
[
'__url__'
],
packages
=
[
'samsam'
],
python_requires
=
'>=3.6'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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