From c74e775ed8cba1c0f13f624b0d588a2619710fc2 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Sat, 19 Sep 2020 01:44:26 -0600 Subject: [PATCH] Consolidate the build to one manifest --- .builds/{lint-test.yml => build.yml} | 24 +++++++++++++++++++---- .builds/flatpak.yml | 20 ------------------- .builds/pypi.yml | 29 ---------------------------- poetry.lock | 16 +++++++++++++-- pyproject.toml | 1 + 5 files changed, 35 insertions(+), 55 deletions(-) rename .builds/{lint-test.yml => build.yml} (54%) delete mode 100644 .builds/flatpak.yml delete mode 100644 .builds/pypi.yml diff --git a/.builds/lint-test.yml b/.builds/build.yml similarity index 54% rename from .builds/lint-test.yml rename to .builds/build.yml index 0262f9d..1ded96e 100644 --- a/.builds/lint-test.yml +++ b/.builds/build.yml @@ -12,10 +12,10 @@ sources: - https://git.sr.ht/~sumner/sublime-music environment: REPO_NAME: sublime-music -# triggers: -# - action: email -# condition: failure -# to: ~sumner/sublime-music-devel@lists.sr.ht +triggers: + - action: email + condition: failure + to: ~sumner/sublime-music-devel@lists.sr.ht tasks: - setup: | cd ${REPO_NAME} @@ -34,3 +34,19 @@ tasks: Xvfb :119 -screen 0 1024x768x16 & export DISPLAY=:119 pytest + + - build: | + python setup.py sdist + + - build-flatpak: | + cd ${REPO_NAME}/flatpak + # REPO=repo ./flatpak_build.sh + + - deploy-pypi: | + ./cicd/run_if_tagged_with_version \ + "twine upload -r testpypi dist/*" \ + "twine upload dist/*" + + - verify-pypi: | + ./cicd/run_if_tagged_with_version \ + "pip install ${REPO_NAME}" diff --git a/.builds/flatpak.yml b/.builds/flatpak.yml deleted file mode 100644 index cc8de3c..0000000 --- a/.builds/flatpak.yml +++ /dev/null @@ -1,20 +0,0 @@ -image: archlinux -packages: - - flatpak - - flatpak-builder - - python-pip -sources: - - https://git.sr.ht/~sumner/sublime-music -environment: - REPO_NAME: sublime-music -# triggers: -# - action: email -# condition: failure -# to: ~sumner/sublime-music-devel@lists.sr.ht -tasks: - - setup: | - pip install requirements-parser - - - build-flatpak: | - cd ${REPO_NAME}/flatpak - # REPO=repo ./flatpak_build.sh diff --git a/.builds/pypi.yml b/.builds/pypi.yml deleted file mode 100644 index cfe3391..0000000 --- a/.builds/pypi.yml +++ /dev/null @@ -1,29 +0,0 @@ -image: alpine/edge -packages: - - py3-pip - - py3-setuptools - - py3-twine -sources: - - https://git.sr.ht/~sumner/sublime-music -environment: - REPO_NAME: sublime-music -# triggers: -# - action: email -# condition: failure -# to: ~sumner/sublime-music-devel@lists.sr.ht -tasks: - - setup: | - cd ${REPO_NAME} - echo "cd ${REPO_NAME}" >> ~/.buildenv - - - build: | - python3 setup.py sdist - - - deploy-pypi: | - ./cicd/run_if_tagged_with_version \ - "twine upload -r testpypi dist/*" \ - "twine upload dist/*" - - - verify-pypi: | - ./cicd/run_if_tagged_with_version \ - "pip install ${REPO_NAME}" diff --git a/poetry.lock b/poetry.lock index cf371b9..8a2a2e5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -579,6 +579,14 @@ chardet = ">=3.0.2,<4" idna = ">=2.5,<3" urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" +[[package]] +name = "requirements-parser" +version = "0.2.0" +description = "Parses Pip requirement files" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "secretstorage" version = "3.1.2" @@ -693,14 +701,14 @@ python-versions = "*" ifaddr = ">=0.1.7" [extras] -keyring = ["keyring"] chromecast = ["pychromecast"] +keyring = ["keyring"] server = ["bottle"] [metadata] lock-version = "1.0" python-versions = "^3.8" -content-hash = "b205eec2da8442d64ad3e77af6740a626b5e79e32b22709e5954a5d49fc8d72b" +content-hash = "8cc15955b68459eeec39b5401c1433195033006da356b290b3a0f49e58f8bf06" [metadata.files] appdirs = [ @@ -1037,6 +1045,10 @@ requests = [ {file = "requests-2.24.0-py2.py3-none-any.whl", hash = "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898"}, {file = "requests-2.24.0.tar.gz", hash = "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b"}, ] +requirements-parser = [ + {file = "requirements-parser-0.2.0.tar.gz", hash = "sha256:5963ee895c2d05ae9f58d3fc641082fb38021618979d6a152b6b1398bd7d4ed4"}, + {file = "requirements_parser-0.2.0-py2-none-any.whl", hash = "sha256:76650b4a9d98fc65edf008a7920c076bb2a76c08eaae230ce4cfc6f51ea6a773"}, +] secretstorage = [ {file = "SecretStorage-3.1.2-py3-none-any.whl", hash = "sha256:b5ec909dde94d4ae2fa26af7c089036997030f0cf0a5cb372b4cccabd81c143b"}, {file = "SecretStorage-3.1.2.tar.gz", hash = "sha256:15da8a989b65498e29be338b3b279965f1b8f09b9668bd8010da183024c8bff6"}, diff --git a/pyproject.toml b/pyproject.toml index 145282b..7e26103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,6 +51,7 @@ flake8 = "^3.8.3" mypy = "^0.782" pytest-cov = "^2.10.1" termcolor = "^1.1.0" +requirements-parser = "^0.2.0" [tool.poetry.extras] chromecast = ["pychromecast"]