From d12928a1e2bd1545f2cf21e234e7b8fa576dc3c9 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 29 Nov 2020 11:07:27 +0100 Subject: [PATCH] add krankerl publish to makefile, initial code signing support --- .gitlab-ci.yml | 10 ++++++++++ CHANGELOG.md | 4 ++++ Makefile | 10 ++++++++++ README.md | 8 ++++++-- Release.md | 14 ++++++++++---- composer.json | 3 +-- l10n/de.js | 4 ++-- l10n/de.json | 6 +++--- src/main.js | 2 +- translationfiles/de/radio.po | 8 ++++---- 10 files changed, 51 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c992c3..28af14e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - compiling - packaging + - signing - publishing image: node:latest @@ -31,6 +32,15 @@ packaging: dotenv: variables.env expire_in: never +signing: + stage: signing + script: + - apt update + - DEBIAN_FRONTEND="noninteractive" apt install -y wget php + - wget https://download.nextcloud.com/server/releases/nextcloud-20.0.2.tar.bz2 + - tar xvf nextcloud-20.0.2.tar.bz2 + - php nextcloud/occ + publishing: stage: publishing image: registry.gitlab.com/gitlab-org/release-cli:latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d56e38..af5712a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ [#215](https://git.project-insanity.org/onny/nextcloud-app-radio/-/issues/215) @onny - Parse and supply changelog to Gitlab release [#216](https://git.project-insanity.org/onny/nextcloud-app-radio/-/issues/216) @onny +- Add German translation + [#190](https://git.project-insanity.org/onny/nextcloud-app-radio/-/issues/190) @onny +- Publish releases to app store using make + [#218](https://git.project-insanity.org/onny/nextcloud-app-radio/-/issues/218) @onny ### Fixed - Add AGPL headers diff --git a/Makefile b/Makefile index e684990..064e575 100644 --- a/Makefile +++ b/Makefile @@ -59,3 +59,13 @@ release: translations: php utils/docker-ci/translations/translationtool/translationtool.phar create-pot-files php utils/docker-ci/translations/translationtool/translationtool.phar convert-po-files + +publish-appstore-nightly: + $(eval ASSET_URL = $(shell curl -s https://git.project-insanity.org/api/v4/projects/onny%2Fnextcloud-app-radio/releases | jq -r '.[0].assets.links[0].url')) + wget $(ASSET_URL) -O build/artifacts/radio.tar.gz + krankerl publish --nightly $(ASSET_URL) + +publish-appstore: + $(eval ASSET_URL = $(shell curl -s https://git.project-insanity.org/api/v4/projects/onny%2Fnextcloud-app-radio/releases | jq -r '.[0].assets.links[0].url')) + wget $(ASSET_URL) -O build/artifacts/radio.tar.gz + krankerl publish $(ASSET_URL) diff --git a/README.md b/README.md index 0ea7751..4426420 100644 --- a/README.md +++ b/README.md @@ -66,9 +66,13 @@ cd nextcloud-app-radio git clone https://github.com/nextcloud/docker-ci.git utils/docker-ci make translations ``` +Use the source file ``translationfiles/template/radio.pot`` to create +translations. For example, contribute translations via +[Transifex](https://www.transifex.com/project-insanityorg/radio-2/dashboard/). -Contribute translations via -[Transifex](https://www.transifex.com/project-insanityorg/radio-2/dashboard/)! +Put the translated language file into the corresponding template folder. For +example the German language file should be placed at +``translationfiles/de/radio.po``. Run ``make translations`` again. ### Prepare a release Consoult [Release.md](Release.md) on how to prepare a release for Gitlab and the app store. diff --git a/Release.md b/Release.md index c7ea30a..c40a53c 100644 --- a/Release.md +++ b/Release.md @@ -13,9 +13,15 @@ release page, including source, a prebuild tarball and the latest changelog. ## Nextcloud app store release -The prebuild tarball can be used in the -[Nextcloud Appstore](https://apps.nextcloud.com/developer/apps/releases/new) -page. The signature can be generated with: +First login to the app store using an API token which can be generated +[here](https://apps.nextcloud.com/account/token). Run the following ``make`` +command to publish a nightly release in the app store. It will fetch and use the +latest release from the Gitlab project. ``` -openssl dgst -sha512 -sign ~/.nextcloud/certificates/radio.key /path/to/radio.tar.gz | openssl base64 +krankerl login --appstore +make publish-appstore-nightly +``` +Or if you want to publish the latest release as a stable release, do: +``` +make publish-appstore ``` diff --git a/composer.json b/composer.json index fba1495..dfdbf18 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "onny/radio", "description": "Lint config for onny/radio", - "license": "MIT", + "license": "AGPL", "config": { "optimize-autoloader": true, "classmap-authoritative": true @@ -10,4 +10,3 @@ "lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;" } } - diff --git a/l10n/de.js b/l10n/de.js index 1226a05..88c88d7 100644 --- a/l10n/de.js +++ b/l10n/de.js @@ -26,8 +26,8 @@ OC.L10N.register( "Tags" : "Stichwörter", "Could not fetch stations from remote API" : "Radio Stationen konnten nicht von der API geladen werden", "Unable to load favorites" : "Favoriten konnten nicht geladen werden", - "Top" : "Beliebteste Stationen", - "Recent" : "Neuste Stationen", + "Top" : "Beliebteste", + "Recent" : "Zuletzt gehört", "New" : "Neu", "Favorites" : "Favoriten", "Categories" : "Kategorien", diff --git a/l10n/de.json b/l10n/de.json index 168ab54..85725e3 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -24,8 +24,8 @@ "Tags" : "Stichwörter", "Could not fetch stations from remote API" : "Radio Stationen konnten nicht von der API geladen werden", "Unable to load favorites" : "Favoriten konnten nicht geladen werden", - "Top" : "Beliebteste Stationen", - "Recent" : "Neuste Stationen", + "Top" : "Beliebteste", + "Recent" : "Zuletzt gehört", "New" : "Neu", "Favorites" : "Favoriten", "Categories" : "Kategorien", @@ -42,4 +42,4 @@ "Remove from favorites" : "Von den Favoriten entfernen", "Details" : "Weitere Informationen" },"pluralForm" :"nplurals=2; plural=(n != 1);" -} \ No newline at end of file +} diff --git a/src/main.js b/src/main.js index a23a19f..5c0b4cc 100644 --- a/src/main.js +++ b/src/main.js @@ -39,7 +39,7 @@ Vue.prototype.n = translatePlural Vue.prototype.OC = window.OC Vue.prototype.OCA = window.OCA Vue.prototype.$apiUrl = 'https://de1.api.radio-browser.info' -Vue.prototype.$version = '1.0' +Vue.prototype.$version = '1.0.1' Vue.use(VueClipboard) Vue.use(VueBlurHash) diff --git a/translationfiles/de/radio.po b/translationfiles/de/radio.po index cb3e980..97ba0f2 100644 --- a/translationfiles/de/radio.po +++ b/translationfiles/de/radio.po @@ -2,10 +2,10 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the Nextcloud package. # FIRST AUTHOR , YEAR. -# +# # Translators: # Jonas Heinrich , 2020 -# +# #, fuzzy msgid "" msgstr "" @@ -125,11 +125,11 @@ msgstr "Favoriten konnten nicht geladen werden" #: /home/onny/projects/nextcloud-app-radio/specialVueFakeDummyForL10nScript.js:22 msgid "Top" -msgstr "Beliebteste Stationen" +msgstr "Beliebteste" #: /home/onny/projects/nextcloud-app-radio/specialVueFakeDummyForL10nScript.js:23 msgid "Recent" -msgstr "Neuste Stationen" +msgstr "Zuletzt gehört" #: /home/onny/projects/nextcloud-app-radio/specialVueFakeDummyForL10nScript.js:24 msgid "New"