Allowing failure of Flatpak build

This commit is contained in:
Sumner Evans
2020-01-19 08:37:31 -07:00
parent fc95db57a8
commit 9a9f7672e3
4 changed files with 49 additions and 23 deletions

View File

@@ -45,14 +45,15 @@ build:
- dist/*
build_flatpak:
image: registry.gitlab.com/sumner/sublime-music/flatpak-build:latest
stage: build
script:
- cd flatpak
- ./flatpak_build.sh
artifacts:
paths:
- flatpak/sublime-music.flatpak
image: registry.gitlab.com/sumner/sublime-music/flatpak-build:latest
allow_failure: true
stage: build
script:
- cd flatpak
- ./flatpak_build.sh
artifacts:
paths:
- flatpak/sublime-music.flatpak
deploy_pypi:
image: python:3.6-alpine

View File

@@ -1,6 +1,11 @@
v0.8.9
======
**Note:** this release does not have Flatpak support due to a dependency issue
that I haven't been able to crack. Please install from PyPi or the AUR. (If you
are a Flatpak expert, I would greatly appreciate help fixing the issue. See
#79.)
* Global Search
* Search for and go to Songs, Artists, Albums, and Playlists.

View File

@@ -30,12 +30,17 @@ fi
description=$(echo "$description" | rst2html5 --no-indent --template "{body}" | sed -e 's/\"/\\\"/g')
url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases"
data="
{
\"name\": \"${CI_COMMIT_TAG}\",
\"tag_name\": \"${CI_COMMIT_TAG}\",
\"description\": \"${description}\",
# Determine whether or not to include the Flatpak build.
curl \
--header 'Content-Type: application/json' \
--header "JOB-TOKEN: $CI_JOB_TOKEN" \
--request GET \
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/pipelines/${CI_PIPELINE_ID}/jobs?scope[]=failed" \
| grep '"name":"build_flatpak"'
assets=""
if [[ $? == 0 ]]; then
assets=",
\"assets\": {
\"links\": [
{
@@ -44,6 +49,16 @@ data="
}
]
}
"
fi
url="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases"
data="
{
\"name\": \"${CI_COMMIT_TAG}\",
\"tag_name\": \"${CI_COMMIT_TAG}\",
\"description\": \"${description}\"
${assets}
}
"
@@ -54,7 +69,7 @@ echo "$data"
curl \
--header 'Content-Type: application/json' \
--header "PRIVATE-TOKEN: ${RELEASE_PUBLISH_TOKEN}" \
--header "JOB-TOKEN: $CI_JOB_TOKEN" \
--data "$data" \
--request POST \
$url

View File

@@ -351,11 +351,16 @@ class MainWindow(Gtk.ApplicationWindow):
value,
artwork_future,
):
def on_search_row_button_press(btn, event):
if action_name == 'song':
goto_action_name, goto_id = 'album', value.albumId
else:
goto_action_name, goto_id = action_name, value.id
self.emit('go-to', goto_action_name, goto_id)
self.hide_search()
row = Gtk.Button(relief=Gtk.ReliefStyle.NONE)
row.connect(
'button-press-event',
lambda *a: self.emit('go-to', action_name, value),
)
row.connect('button-press-event', on_search_row_button_press)
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
image = SpinnerImage(image_name='search-artwork', image_size=30)
@@ -385,7 +390,7 @@ class MainWindow(Gtk.ApplicationWindow):
song.coverArt, size=50)
self.song_results.add(
self.create_search_result_row(
label_text, 'album', song.albumId, cover_art_future))
label_text, 'song', song, cover_art_future))
self.song_results.show_all()
@@ -402,7 +407,7 @@ class MainWindow(Gtk.ApplicationWindow):
album.coverArt, size=50)
self.album_results.add(
self.create_search_result_row(
label_text, 'album', album.id, cover_art_future))
label_text, 'album', album, cover_art_future))
self.album_results.show_all()
@@ -414,7 +419,7 @@ class MainWindow(Gtk.ApplicationWindow):
cover_art_future = CacheManager.get_artist_artwork(artist)
self.artist_results.add(
self.create_search_result_row(
label_text, 'artist', artist.id, cover_art_future))
label_text, 'artist', artist, cover_art_future))
self.artist_results.show_all()
@@ -427,7 +432,7 @@ class MainWindow(Gtk.ApplicationWindow):
playlist.coverArt)
self.playlist_results.add(
self.create_search_result_row(
label_text, 'playlist', playlist.id, cover_art_future))
label_text, 'playlist', playlist, cover_art_future))
self.playlist_results.show_all()