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:
parent
f806fb8ed2
commit
868b8396a0
74
.github/workflows/aux.library.pypi.yml
vendored
74
.github/workflows/aux.library.pypi.yml
vendored
@ -1,38 +1,36 @@
|
||||
# This always runs atm
|
||||
# no idea wtf is going on
|
||||
#name: Publish library to PyPI
|
||||
#
|
||||
#on:
|
||||
# push:
|
||||
# paths:
|
||||
# - 'auxiliary/malojalib/pyproject.toml'
|
||||
# # When the version updates, this file changes
|
||||
# # False positives only result in a failed push
|
||||
#
|
||||
#jobs:
|
||||
# publish_to_pypi:
|
||||
# name: Push Library to PyPI
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Check out the repo
|
||||
# uses: actions/checkout@v2
|
||||
#
|
||||
# - name: Set up Python
|
||||
# uses: actions/setup-python@v2
|
||||
# with:
|
||||
# python-version: '3.x'
|
||||
#
|
||||
# - name: Install dependencies
|
||||
# run: pip install build
|
||||
#
|
||||
# - name: Change directory
|
||||
# run: cd auxiliary/malojalib
|
||||
#
|
||||
# - name: Build package
|
||||
# run: python -m build
|
||||
#
|
||||
# - name: Publish to PyPI
|
||||
# uses: pypa/gh-action-pypi-publish@release/v1
|
||||
# with:
|
||||
# user: __token__
|
||||
# password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
name: Publish library to PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'auxiliary/malojalib/pyproject.toml'
|
||||
# When the version updates, this file changes
|
||||
# False positives only result in a failed push
|
||||
|
||||
jobs:
|
||||
publish_to_pypi:
|
||||
name: Push Library to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install build
|
||||
|
||||
- name: Change directory
|
||||
run: cd auxiliary/malojalib
|
||||
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
|
||||
- name: Publish to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
@ -1,28 +1,11 @@
|
||||
# This file has now been slighly repurposed and will simply give other parts of
|
||||
# the package access to some global meta-information about itself
|
||||
|
||||
try:
|
||||
# from source
|
||||
import toml
|
||||
with open("./pyproject.toml") as filed:
|
||||
metadata = toml.load(filed)['project']
|
||||
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"
|
||||
# you know what f*ck it
|
||||
# this is hardcoded for now because of that damn project / package name discrepancy
|
||||
# i'll fix it one day
|
||||
VERSION = "2.14.4"
|
||||
HOMEPAGE = "https://github.com/krateng/maloja"
|
||||
|
||||
|
||||
USER_AGENT = f"Maloja/{VERSION} ( {HOMEPAGE} )"
|
||||
|
@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "maloja"
|
||||
pypi_name = "malojaserver"
|
||||
version = "2.14.3"
|
||||
version = "2.14.4"
|
||||
description = "Self-hosted music scrobble database"
|
||||
readme = "./README.md"
|
||||
requires-python = ">=3.6"
|
||||
|
Loading…
Reference in New Issue
Block a user