From b318b3445ac51693f00751e7d69a065cc3038287 Mon Sep 17 00:00:00 2001 From: Faerbit Date: Tue, 27 Sep 2022 18:29:07 +0200 Subject: [PATCH] [ci] Also package with pyinstaller --- .gitlab-ci.yml | 20 +++++++++++++++----- Pipfile | 1 + Pipfile.lock | 38 +++++++++++++++++++++++++++----------- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0e2d19a..6a494ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,24 +4,34 @@ variables: PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIPENV_VENV_IN_PROJECT: 1 +stages: + - build + - deploy + - release + cache: paths: - .cache/pip - .venv/ -package_pip: +package_linux: stage: build - script: + before_script: - python --version - - pip install pipenv build + - pip install pipenv - pipenv sync --dev - - pipenv run python -m build -w + script: + - pipenv shell + - VERSION=$(python -m setuptools_scm) + - python -m build -w + - pyinstaller --onefile --strip --name fime_${VERSION} src/main/fime.py artifacts: paths: - dist/*.whl + - dist/fime_* release_job: - stage: deploy + stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: $CI_COMMIT_TAG diff --git a/Pipfile b/Pipfile index a4f35cd..7236bce 100644 --- a/Pipfile +++ b/Pipfile @@ -11,6 +11,7 @@ requests-futures = "~=1.0" [dev-packages] pyinstaller = "~=5.1" build = "~=0.8" +setuptools_scm = "~=7.0" [requires] python_version = "3.10" diff --git a/Pipfile.lock b/Pipfile.lock index d0350cf..22b6b86 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "a4a087796f175fb850f79cbb18fa4b5649ed809c714f0bce728e27ef263eb503" + "sha256": "44805faf23521c3b81f7051855e82b7ab7cf2f0a1d5442ceb03227f82171a620" }, "pipfile-spec": 6, "requires": { @@ -18,18 +18,18 @@ "default": { "certifi": { "hashes": [ - "sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5", - "sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516" + "sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14", + "sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382" ], "markers": "python_version >= '3.6'", - "version": "==2022.9.14" + "version": "==2022.9.24" }, "charset-normalizer": { "hashes": [ "sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845", "sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f" ], - "markers": "python_version >= '3.6'", + "markers": "python_full_version >= '3.6.0'", "version": "==2.1.1" }, "idna": { @@ -104,10 +104,10 @@ "develop": { "altgraph": { "hashes": [ - "sha256:743628f2ac6a7c26f5d9223c91ed8ecbba535f506f4b6f558885a8a56a105857", - "sha256:ebf2269361b47d97b3b88e696439f6e4cbc607c17c51feb1754f90fb79839158" + "sha256:ad33358114df7c9416cdb8fa1eaa5852166c505118717021c6a8c7c7abbd03dd", + "sha256:c8ac1ca6772207179ed8003ce7687757c04b0b71536f81e2ac5755c6226458fe" ], - "version": "==0.17.2" + "version": "==0.17.3" }, "build": { "hashes": [ @@ -168,11 +168,19 @@ }, "setuptools": { "hashes": [ - "sha256:2e24e0bec025f035a2e72cdd1961119f557d78ad331bb00ff82efb2ab8da8e82", - "sha256:7732871f4f7fa58fb6bdcaeadb0161b2bd046c85905dbaa066bdcbcc81953b57" + "sha256:a8f6e213b4b0661f590ccf40de95d28a177cd747d098624ad3f69c40287297e9", + "sha256:c2d2709550f15aab6c9110196ea312f468f41cd546bceb24127a1be6fdcaeeb1" ], "markers": "python_version >= '3.7'", - "version": "==65.3.0" + "version": "==65.4.0" + }, + "setuptools-scm": { + "hashes": [ + "sha256:031e13af771d6f892b941adb6ea04545bbf91ebc5ce68c78aaf3fff6e1fb4844", + "sha256:7930f720905e03ccd1e1d821db521bff7ec2ac9cf0ceb6552dd73d24a45d3b02" + ], + "index": "pypi", + "version": "==7.0.5" }, "tomli": { "hashes": [ @@ -181,6 +189,14 @@ ], "markers": "python_version < '3.11'", "version": "==2.0.1" + }, + "typing-extensions": { + "hashes": [ + "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02", + "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6" + ], + "markers": "python_version >= '3.7'", + "version": "==4.3.0" } } }