mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-01-11 22:41:03 +03:00
Release notes
This commit is contained in:
parent
a28db76a6b
commit
1f0975300f
3
.github/workflows/build.sh
vendored
3
.github/workflows/build.sh
vendored
@ -16,7 +16,7 @@ case $OS in
|
|||||||
"Arch Linux")
|
"Arch Linux")
|
||||||
echo "Arch Linux"
|
echo "Arch Linux"
|
||||||
pacman -Syy --noconfirm
|
pacman -Syy --noconfirm
|
||||||
pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron libpulse dpkg unzip xdg-utils
|
pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron libpulse dpkg unzip xdg-utils python
|
||||||
# fix makepkg from non-root
|
# fix makepkg from non-root
|
||||||
mkdir /home/build
|
mkdir /home/build
|
||||||
chgrp nobody /home/build
|
chgrp nobody /home/build
|
||||||
@ -30,6 +30,7 @@ case $OS in
|
|||||||
mv *.pkg.tar.zst dist
|
mv *.pkg.tar.zst dist
|
||||||
|
|
||||||
mv ./src/app/yandexmusic.asar dist/yandexmusic.asar
|
mv ./src/app/yandexmusic.asar dist/yandexmusic.asar
|
||||||
|
mv ./src/app/release_notes.json dist/release_notes.json
|
||||||
|
|
||||||
sh ./build_deb.sh -a all
|
sh ./build_deb.sh -a all
|
||||||
mv deb/*.deb dist
|
mv deb/*.deb dist
|
||||||
|
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -44,6 +44,11 @@ jobs:
|
|||||||
path: ./dist/*.asar
|
path: ./dist/*.asar
|
||||||
name: asar-packages
|
name: asar-packages
|
||||||
|
|
||||||
|
- name: Upload Release Notes
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
path: ./dist/release_notes.json
|
||||||
|
|
||||||
nix-build:
|
nix-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
|
12
.github/workflows/update-build-release.yml
vendored
12
.github/workflows/update-build-release.yml
vendored
@ -55,11 +55,11 @@ jobs:
|
|||||||
commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }}
|
commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
if: ${{ (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') || (needs.update_packages.new_version) }}
|
if: ${{ (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') || (needs.update_packages.outputs.new_version) }}
|
||||||
needs: update_packages
|
needs: update_packages
|
||||||
uses: ./.github/workflows/build.yml
|
uses: ./.github/workflows/build.yml
|
||||||
with:
|
with:
|
||||||
ref: ${{ (needs.update_packages.commit_long_sha || '') }}
|
ref: ${{ (needs.update_packages.outputs.commit_long_sha || '') }}
|
||||||
|
|
||||||
upload-release:
|
upload-release:
|
||||||
needs: build
|
needs: build
|
||||||
@ -68,7 +68,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ (needs.build.needs.update_packages.commit_long_sha || '') }}
|
ref: ${{ (needs.build.needs.update_packages.outputs.commit_long_sha || '') }}
|
||||||
|
|
||||||
- name: Download artifact
|
- name: Download artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@ -82,6 +82,11 @@ jobs:
|
|||||||
sudo apt-get install jq
|
sudo apt-get install jq
|
||||||
sh ./.github/workflows/retrieve_version.sh
|
sh ./.github/workflows/retrieve_version.sh
|
||||||
|
|
||||||
|
- name: Get Release HTML
|
||||||
|
run: echo "release_html=$(jq -r '."desktop-release-notes.$VERSION"' ./dist/release_notes.json)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- run: rm -rf dist/release_notes.json
|
||||||
|
|
||||||
- name: Tag Repo
|
- name: Tag Repo
|
||||||
uses: richardsimko/update-tag@v1
|
uses: richardsimko/update-tag@v1
|
||||||
with:
|
with:
|
||||||
@ -98,4 +103,5 @@ jobs:
|
|||||||
name: ${{ env.release_name }}
|
name: ${{ env.release_name }}
|
||||||
replacesArtifacts: true
|
replacesArtifacts: true
|
||||||
tag: ${{ env.tag_name }}
|
tag: ${{ env.tag_name }}
|
||||||
|
body: ${{ env.release_html }}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
, p7zip
|
, p7zip
|
||||||
, asar
|
, asar
|
||||||
, jq
|
, jq
|
||||||
|
, python3
|
||||||
, electron
|
, electron
|
||||||
|
|
||||||
, ymExe ? null
|
, ymExe ? null
|
||||||
@ -23,6 +24,7 @@ stdenvNoCC.mkDerivation
|
|||||||
p7zip
|
p7zip
|
||||||
asar
|
asar
|
||||||
jq
|
jq
|
||||||
|
python3
|
||||||
makeWrapper
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ usage() {
|
|||||||
|
|
||||||
exe_location=
|
exe_location=
|
||||||
dst="$PWD/app"
|
dst="$PWD/app"
|
||||||
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
fix_quit=1
|
fix_quit=1
|
||||||
while getopts :xo:qh name; do
|
while getopts :xo:qh name; do
|
||||||
case $name in
|
case $name in
|
||||||
@ -115,5 +116,6 @@ asar pack "$TEMPDIR/app" "$dst/yandexmusic.asar"
|
|||||||
for ext in png svg; do
|
for ext in png svg; do
|
||||||
mv "$TEMPDIR/app/build/next-desktop/favicon.$ext" "$dst"
|
mv "$TEMPDIR/app/build/next-desktop/favicon.$ext" "$dst"
|
||||||
done
|
done
|
||||||
|
python "$SCRIPT_DIR/utility/extract_release_notes.py" "$TEMPDIR/app/build/next-desktop/album.txt" "$dst/release_notes.json"
|
||||||
|
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
@ -8,7 +8,7 @@ arch=("any")
|
|||||||
url="https://github.com/cucumber-sp/yandex-music-linux"
|
url="https://github.com/cucumber-sp/yandex-music-linux"
|
||||||
license=("custom")
|
license=("custom")
|
||||||
depends=("electron" "libpulse" "xdg-utils")
|
depends=("electron" "libpulse" "xdg-utils")
|
||||||
makedepends=("p7zip" "nodejs" "asar" "jq")
|
makedepends=("p7zip" "nodejs" "asar" "jq" "python")
|
||||||
|
|
||||||
source=("%exe_link%" "git+https://github.com/cucumber-sp/yandex-music-linux")
|
source=("%exe_link%" "git+https://github.com/cucumber-sp/yandex-music-linux")
|
||||||
sha256sums=("%exe_sha256%" "SKIP")
|
sha256sums=("%exe_sha256%" "SKIP")
|
||||||
|
50
utility/extract_release_notes.py
Normal file
50
utility/extract_release_notes.py
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
import sys
|
||||||
|
import json
|
||||||
|
|
||||||
|
if len(sys.argv) < 3:
|
||||||
|
print("Usage: python extract_release_notes.py <file_name>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
file_name = sys.argv[1]
|
||||||
|
save_file_name = sys.argv[2]
|
||||||
|
|
||||||
|
def build_html(data, first_launch=False):
|
||||||
|
html = ""
|
||||||
|
for i, element in enumerate(data):
|
||||||
|
if element['type'] == 0:
|
||||||
|
if first_launch and i == 0:
|
||||||
|
html += f"<h2>{element['value']}</h2>".replace('\n', '<br/>')
|
||||||
|
continue
|
||||||
|
if element['value'] == '\n':
|
||||||
|
html += "<br/>"
|
||||||
|
else:
|
||||||
|
html += f"<span>{element['value']}</span>".replace('\n', '<br/>')
|
||||||
|
elif element['type'] == 8:
|
||||||
|
html += f"<{element['value']}>{build_html(element['children'])}</{element['value']}>"
|
||||||
|
return html
|
||||||
|
|
||||||
|
with open(file_name, "r", encoding='utf-8') as file:
|
||||||
|
full_text = file.read()
|
||||||
|
|
||||||
|
notes = {}
|
||||||
|
position = full_text.find("desktop-release-notes.")
|
||||||
|
while position != -1:
|
||||||
|
start_position = position
|
||||||
|
while full_text[position] != '"':
|
||||||
|
position += 1
|
||||||
|
name = full_text[start_position:position]
|
||||||
|
position += 2
|
||||||
|
start_position = position
|
||||||
|
braces_count = 1
|
||||||
|
while braces_count > 0:
|
||||||
|
position += 1
|
||||||
|
if full_text[position] == '{' or full_text[position] == '[':
|
||||||
|
braces_count += 1
|
||||||
|
elif full_text[position] == '}' or full_text[position] == ']':
|
||||||
|
braces_count -= 1
|
||||||
|
data = full_text[start_position:position + 1]
|
||||||
|
notes[name] = build_html(json.loads(data), True)
|
||||||
|
position = full_text.find("desktop-release-notes.", position)
|
||||||
|
|
||||||
|
with open(save_file_name, "w", encoding='utf-8') as file:
|
||||||
|
file.write(json.dumps(notes, ensure_ascii=False, indent=4))
|
Loading…
Reference in New Issue
Block a user