diff options
author | zoorat | 2023-11-12 10:40:36 +0600 |
---|---|---|
committer | zoorat | 2023-11-12 10:40:36 +0600 |
commit | 220b3288c3aa4852893832d8c345b834d92bd74f (patch) | |
tree | 369a169fcea8ff43f68b80a0b6a13251f61a568b | |
parent | 4ed4db5fdb86cc1cdcc53b1085b7be5ce3ddf140 (diff) | |
download | aur-220b3288c3aa4852893832d8c345b834d92bd74f.tar.gz |
adding changelog and better tooling
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile | 90 | ||||
-rw-r--r-- | PKGBUILD | 18 | ||||
-rw-r--r-- | changelog.md | 46 |
5 files changed, 151 insertions, 10 deletions
@@ -1,8 +1,9 @@ pkgbase = python-spotdl pkgdesc = Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found). pkgver = 4.2.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/spotDL/spotify-downloader + changelog = changelog.md arch = any license = MIT checkdepends = python-pytest-asyncio diff --git a/.gitignore b/.gitignore index 05c6d4d4c97b..fd1cf73e6413 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ * !.gitignore -!.SRCINFO +!Makefile !PKGBUILD +!.SRCINFO +!changelog.md diff --git a/Makefile b/Makefile new file mode 100644 index 000000000000..ffa42df81816 --- /dev/null +++ b/Makefile @@ -0,0 +1,90 @@ +MAKEFLAGS += --warn-undefined-variables +SHELL=/bin/bash + +REPO = $(shell grep url .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]') +VERSION = $(shell grep pkgver .SRCINFO | cut -d '=' -f 2 | tr -d '[:space:]') +TRASH = $(shell git check-ignore * | tr '\n' ' ') + +# DEFAULT +all: clean log sum build check pre clean + +# just build the package +build: + makepkg -sfr + +# build and install the package +install: + makepkg --install + +# update checksums +sum: + updpkgsums + +# check/lint +check: + @echo "shellcheck: " + shellcheck -e SC2148 -e SC2034 PKGBUILD || exit 0 + + @echo "shell formate: " + shfmt -d PKGBUILD || exit 0 + + @echo "checking PKGBUILD: " + namcap -i PKGBUILD + + @echo "checking build: " + namcap -i *.pkg.* + +# clean up the mess +clean: +ifeq ($(strip $(TRASH)),) + @echo "nothing to clear" +else + file $(TRASH) + @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \ + trash-put -v $(TRASH) ; \ + exit 0 ; \ + fi +endif + +# generate `changelog.md` +log: + @echo "wait, it will take some time" + $(eval NAME := $(shell gh release --repo $(REPO) view --json name | jq -r .name)) + echo "# Name: $(NAME) " >changelog.md + $(eval URL := $(shell gh release --repo $(REPO) view --json url | jq -r .url)) + echo "### URL: $(URL)" >>changelog.md + $(eval PUBLISHED_AT := $(shell gh release --repo $(REPO) view --json publishedAt | jq -r .publishedAt)) + $(eval AUTHOR := $(shell gh release --repo $(REPO) view --json author | jq -r .author.login)) + echo "### published at '$(PUBLISHED_AT)' by $(AUTHOR)" >>changelog.md + echo "---" >>changelog.md + gh release --repo $(REPO) view --json body | jq -r .body >>changelog.md + +# prepare for commit +pre: + shfmt -w PKGBUILD + makepkg --printsrcinfo > .SRCINFO + + git diff + + git add PKGBUILD + git add changelog.md + git add .SRCINFO + git add .gitignore + git add Makefile + +# commit with version bump message +commit: + $(eval VERSION := $(shell read -p "enter version (pkgver=$(VERSION)): " enter ; echo $${enter})) + @echo "commit message: \"updating to v$(VERSION)\"" + + @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \ + git diff --cached ; \ + exit 0 ; \ + fi + + @echo -n "Are you sure? [Y/n] " && read ans && if [ $${ans:-'Y'} = 'Y' ]; then \ + git commit -m "updating to v$(VERSION)" ; \ + exit 0 ; \ + fi + + @echo "recheck everything before pushing to AUR" @@ -7,13 +7,15 @@ pkgname=python-spotdl pkgver=4.2.1 -pkgrel=1 +pkgrel=2 pkgdesc='Download your Spotify playlists and songs along with album art and metadata (from YouTube if a match is found).' arch=('any') url='https://github.com/spotDL/spotify-downloader' +# url='https://spotdl.readthedocs.io/en/latest/' license=('MIT') +# https://github.com/spotDL/spotify-downloader/blob/master/pyproject.toml depends=( 'ffmpeg' 'python' @@ -43,7 +45,7 @@ makedepends=('python-build' 'python-installer' 'python-wheel' 'python-poetry-cor checkdepends=('python-pytest-asyncio') provides=("$pkgname" 'spotdl') options=(strip emptydirs zipman) -# install="spotdl.install" +changelog="changelog.md" source=("https://pypi.io/packages/source/s/spotdl/spotdl-$pkgver.tar.gz") # source=("https://github.com/spotDL/spotify-downloader/archive/refs/tags/v$pkgver.zip") @@ -51,21 +53,21 @@ b2sums=('f07541071b20fbb1ab7f98ff9cd1543a62edd52354531bbb2d7f4d4ef508a1d3a7b80a1 # Document: https://wiki.archlinux.org/title/Python_package_guidelines build() { - pushd spotdl-$pkgver + pushd spotdl-$pkgver || exit # https://github.com/python-poetry/poetry/issues/5547 GIT_DIR=. python -m build --wheel --no-isolation - popd + popd || exit } check() { - pushd spotdl-$pkgver + pushd spotdl-$pkgver || exit pytest || echo 'Tests failed!' - popd + popd || exit } package() { - pushd spotdl-$pkgver + pushd spotdl-$pkgver || exit python -m installer --destdir="$pkgdir" dist/*.whl install -vDm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" - popd + popd || exit } diff --git a/changelog.md b/changelog.md new file mode 100644 index 000000000000..56b195a61c57 --- /dev/null +++ b/changelog.md @@ -0,0 +1,46 @@ +# Name: v4.2.1 +### URL: https://github.com/spotDL/spotify-downloader/releases/tag/v4.2.1 +### published at '2023-09-01T22:44:30Z' by xnetcat +--- +## What's Changed
+
+Web:
+- Playlist, artist and album download from web app by @oscarvx00 in #1865
+
+Bugfixes:
+- check if track is a song when downloading playlists by @xnetcat in 8949b9a692c8fabac266f95f2a2a5895daaf7769
+- Support for manual Bandcamp and Soundcloud download. (Using like manual Youtube download in the format MusicURL|SpotifyURL) by @Piripe in #1897
+- Fix crash when filtering results with the --dont-filter-results argument when a provider has 0 result by @Piripe in #1897
+- Fixed a crash with the cache by @Piripe in #1897
+- Fixed matching error when downloading an album caused by track duration by @Piripe in #1897
+- Fixed bandcamp audio provider by @xnetcat in b1a48debc573924d100a91a47f2bc0ab741a51cc a4c6e8dcb80ab99cd62f84b80dcba0ec7a1dadde
+
+Improvements:
+- use downloader settings when parsing query by @xnetcat in 0a692c7b0b0610204908c7823cd14ce078df1b6d
+- added more checks for sync file by @xnetcat in 5e34b216287b84daecf5b26afb6c99b57d4572ab
+- respect detect-formats option when using m3u option by @xnetcat in 8a8891e097480caccbda74b75f5ed1d62bb05f81
+- fixed/improved search term matching by @xnetcat in db11f719d7ba76451e3a7d628909277cab8ac38d
+
+New features:
+- added option to save errors by @xnetcat in 920442e134292e892b762b4fdf7f69aeafc3c972
+- added more checks for sync file
+- added ability to print to stdout when using save by @xnetcat in ce2bce651d46810621ae8eb729bb816ccdd115dc
+- added `all-user-followed-artists` shortcut by @xnetcat in f9f110f61dd7bb388546bd6791da81fbb5d2077f
+
+Misc:
+- updated packages by @xnetcat in f8d749048537239085d7335e24f2f87ed24402ab
+
+**Full Changelog**: https://github.com/spotDL/spotify-downloader/compare/v4.2.0...v4.2.1
+
+## New Contributors
+* @oscarvx00 made their first contribution in https://github.com/spotDL/spotify-downloader/pull/1865
+* @Piripe made their first contribution in https://github.com/spotDL/spotify-downloader/pull/1897
+
+## Donate
+
+help support the development and maintenance of the software ❤️
+
+[![paypal](https://img.shields.io/badge/paypal-%2300457C.svg?&style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/kko7)
+[![kofi](https://img.shields.io/badge/kofi-%23F16061.svg?&style=for-the-badge&logo=ko-fi&logoColor=white)](https://ko-fi.com/xnetcat)
+
+ |