1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Sorry to all the docker people for the constant pointless releases

This commit is contained in:
krateng 2021-12-31 05:46:47 +01:00
parent f806fb8ed2
commit 868b8396a0
3 changed files with 42 additions and 61 deletions

View File

@ -1,38 +1,36 @@
# This always runs atm name: Publish library to PyPI
# no idea wtf is going on
#name: Publish library to PyPI on:
# push:
#on: paths:
# push: - 'auxiliary/malojalib/pyproject.toml'
# paths: # When the version updates, this file changes
# - 'auxiliary/malojalib/pyproject.toml' # False positives only result in a failed push
# # When the version updates, this file changes
# # False positives only result in a failed push jobs:
# publish_to_pypi:
#jobs: name: Push Library to PyPI
# publish_to_pypi: runs-on: ubuntu-latest
# name: Push Library to PyPI steps:
# runs-on: ubuntu-latest - name: Check out the repo
# steps: uses: actions/checkout@v2
# - name: Check out the repo
# uses: actions/checkout@v2 - name: Set up Python
# uses: actions/setup-python@v2
# - name: Set up Python with:
# uses: actions/setup-python@v2 python-version: '3.x'
# with:
# python-version: '3.x' - name: Install dependencies
# run: pip install build
# - name: Install dependencies
# run: pip install build - name: Change directory
# run: cd auxiliary/malojalib
# - name: Change directory
# run: cd auxiliary/malojalib - name: Build package
# run: python -m build
# - name: Build package
# run: python -m build - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# - name: Publish to PyPI with:
# uses: pypa/gh-action-pypi-publish@release/v1 user: __token__
# with: password: ${{ secrets.PYPI_API_TOKEN }}
# user: __token__
# password: ${{ secrets.PYPI_API_TOKEN }}

View File

@ -1,28 +1,11 @@
# This file has now been slighly repurposed and will simply give other parts of # This file has now been slighly repurposed and will simply give other parts of
# the package access to some global meta-information about itself # the package access to some global meta-information about itself
try: # you know what f*ck it
# from source # this is hardcoded for now because of that damn project / package name discrepancy
import toml # i'll fix it one day
with open("./pyproject.toml") as filed: VERSION = "2.14.4"
metadata = toml.load(filed)['project'] HOMEPAGE = "https://github.com/krateng/maloja"
VERSION = metadata['version'] + "-dev"
HOMEPAGE = metadata['urls']['homepage']
# this will give wrong info when the installed package is run, but we just
# happen to be in the directory of the project
# but this can't be helped I think
except:
# package distributrion
from pkg_resources import get_distribution
pkg = get_distribution('maloja') # also contains a metadata
VERSION = pkg.version
#urls = metadata.metadata('maloja').get_all('Project-URL')
#urls = [e.split(', ') for e in urls]
#HOMEPAGE = [e[1] for e in urls if e[0] == 'homepage'][0]
# hardcode this for now
HOMEPAGE = "https://github.com/krateng/maloja"
USER_AGENT = f"Maloja/{VERSION} ( {HOMEPAGE} )" USER_AGENT = f"Maloja/{VERSION} ( {HOMEPAGE} )"

View File

@ -1,7 +1,7 @@
[project] [project]
name = "maloja" name = "maloja"
pypi_name = "malojaserver" pypi_name = "malojaserver"
version = "2.14.3" version = "2.14.4"
description = "Self-hosted music scrobble database" description = "Self-hosted music scrobble database"
readme = "./README.md" readme = "./README.md"
requires-python = ">=3.6" requires-python = ">=3.6"