Commit 66766865 authored by Vincent Texier's avatar Vincent Texier
Browse files

Merge branch 'fix_missing_mo' into 'main'

Fix missing mo in gitlab ci/cd pypi publish

See merge request !2
parents 90f682a4 02b5a35e
Pipeline #14092 waiting for manual action with stages
in 12 minutes and 3 seconds
......@@ -8,7 +8,7 @@ stages:
variables:
DOCKER_IMAGE: "registry.duniter.org/docker/python3/tikka-builder"
CICD_OS_TAG: "ubuntu-18.04"
TIKKA_VERSION: "0.1.5"
TIKKA_VERSION: "0.1.6"
UBUNTU_1804_AMD64_BINARY: "tikka-${TIKKA_VERSION}-ubuntu-18-04-amd64.zip"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/release/${TIKKA_VERSION}"
......@@ -29,71 +29,72 @@ image: $DOCKER_IMAGE/$CICD_OS_TAG
- Makefile
- pyproject.toml
#wheel:
# extends: .changes
# stage: checks
# script:
# - poetry build
#
#checks:
# extends: .code_changes
# stage: checks
# script:
# - poetry install --no-root
# - make format
# - make mypy
# - make pylint
# - make isort
# - make insert-license
#
#tests:
# extends: .changes
# stage: tests
# script:
# - poetry install --no-root
# - bin/tests.sh tests/domains tests/libs
ubuntu-18-04-amd64:
stage: build
image: "registry.duniter.org/docker/python3/tikka-builder/ubuntu-18.04"
wheel:
extends: .changes
stage: checks
script:
- poetry install --no-root
- make i18n_build
- make pyinstaller
- mv dist/tikka-${TIKKA_VERSION}.zip dist/${UBUNTU_1804_AMD64_BINARY}
artifacts:
paths:
- dist/${UBUNTU_1804_AMD64_BINARY}
#expire_in: 1 yrs
expire_in: 1 days
rules:
- if: $CI_COMMIT_TAG
- make build
upload:
stage: upload
image: curlimages/curl:latest
rules:
- if: $CI_COMMIT_TAG
checks:
extends: .code_changes
stage: checks
script:
- |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file dist/${UBUNTU_1804_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${UBUNTU_1804_AMD64_BINARY}"
- poetry install --no-root
- make format
- make mypy
- make pylint
- make isort
- make insert-license
release:
# Caution, as of 2021-02-02 these assets links require a login, see:
# https://gitlab.com/gitlab-org/gitlab/-/issues/299384
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
tests:
extends: .changes
stage: tests
script:
- |
release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
--assets-link "{\"name\":\"${UBUNTU_1804_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${UBUNTU_1804_AMD64_BINARY}\"}"
- poetry install --no-root
- bin/tests.sh tests/domains tests/libs
#
#ubuntu-18-04-amd64:
# stage: build
# image: "registry.duniter.org/docker/python3/tikka-builder/ubuntu-18.04"
# script:
# - poetry install --no-root
# - make i18n_build
# - make pyinstaller
# - mv dist/tikka-${TIKKA_VERSION}.zip dist/${UBUNTU_1804_AMD64_BINARY}
# artifacts:
# paths:
# - dist/${UBUNTU_1804_AMD64_BINARY}
# #expire_in: 1 yrs
# expire_in: 1 days
# rules:
# - if: $CI_COMMIT_TAG
#
#upload:
# stage: upload
# image: curlimages/curl:latest
# rules:
# - if: $CI_COMMIT_TAG
# script:
# - |
# curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file dist/${UBUNTU_1804_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${UBUNTU_1804_AMD64_BINARY}"
#
#release:
# # Caution, as of 2021-02-02 these assets links require a login, see:
# # https://gitlab.com/gitlab-org/gitlab/-/issues/299384
# stage: release
# image: registry.gitlab.com/gitlab-org/release-cli:latest
# rules:
# - if: $CI_COMMIT_TAG
# script:
# - |
# release-cli create --name "Release $CI_COMMIT_TAG" --tag-name $CI_COMMIT_TAG \
# --assets-link "{\"name\":\"${UBUNTU_1804_AMD64_BINARY}\",\"url\":\"${PACKAGE_REGISTRY_URL}/${UBUNTU_1804_AMD64_BINARY}\"}"
pypi:
stage: release
script:
- poetry publish --build --username $PYPI_LOGIN --password $PYPI_PASSWORD
- make build
- poetry publish --username $PYPI_LOGIN --password $PYPI_PASSWORD
rules:
- if: $CI_COMMIT_TAG
when: manual
......@@ -102,9 +103,10 @@ pypi:
pypi_test:
stage: release
script:
- make build
- poetry config repositories.pypi_test https://test.pypi.org/legacy/
- poetry publish --build --username $PYPI_TEST_LOGIN --password $PYPI_TEST_PASSWORD --repository pypi_test
- poetry publish --username $PYPI_TEST_LOGIN --password $PYPI_TEST_PASSWORD --repository pypi_test
rules:
- if: $CI_COMMIT_TAG
when: manual
- when: never
# - if: $CI_COMMIT_TAG
- when: manual
# - when: never
.PHONY: format check mypy pylint isort insert-license gitlab-ci-linter i18n_update i18n_build database database_rollback database_list pyinstaller
.PHONY: format check mypy pylint isort insert-license gitlab-ci-linter i18n_update i18n_build database database_rollback database_list build pyinstaller
SHELL := /bin/bash
......@@ -11,7 +11,6 @@ mypy:
poetry run mypy --ignore-missing-imports tikka
poetry run mypy --ignore-missing-imports tests
# check code errors
pylint:
poetry run pylint tikka
......@@ -53,5 +52,10 @@ database_list:
poetry run yoyo list --no-config-file --database sqlite:///${HOME}/.config/tikka/g1.sqlite3 ./tikka/assets/migrations
poetry run yoyo list --no-config-file --database sqlite:///${HOME}/.config/tikka/g1-test.sqlite3 ./tikka/assets/migrations
build:
msgfmt tikka/locales/fr_FR/LC_MESSAGES/application.po --output-file=tikka/locales/fr_FR/LC_MESSAGES/application.mo
msgfmt tikka/locales/en_US/LC_MESSAGES/application.po --output-file=tikka/locales/en_US/LC_MESSAGES/application.mo
poetry build
pyinstaller:
./bin/build.sh
./bin/pyinstaller.sh
[tool.poetry]
name = "tikka"
version = "0.1.5"
version = "0.1.6"
description = "Tikka is a fast and light Python/Tk client to manage your Ğ1 accounts"
authors = ["Vincent Texier <vit@free.fr>"]
include = ["tikka/locales/*/LC_MESSAGES/*.mo"]
......
......@@ -13,4 +13,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = "0.1.5"
__version__ = "0.1.6"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment