Bladeren bron

build: generate AppImage file

tags/v0.10.8
Jérôme Deuchnord 2 jaren geleden
committed by Jérôme Deuchnord
bovenliggende
commit
9c32dfbf7a
5 gewijzigde bestanden met toevoegingen van 126 en 5 verwijderingen
  1. +42
    -0
      .github/workflows/appimage.yml
  2. +6
    -0
      .gitignore
  3. +66
    -0
      AppImageBuilder.yml
  4. +9
    -2
      Makefile
  5. +3
    -3
      _kosmorro/locales/messages.pot

+ 42
- 0
.github/workflows/appimage.yml Bestand weergeven

@@ -0,0 +1,42 @@
name: AppImage

on:
pull_request:
branches: [master, features]
release:

jobs:
build-appimage:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare environment
run: |
sudo gem install ronn
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
pip install -U pip pipenv Babel wheel appimage-builder
pipenv install --dev

- name: Build wheel
run: |
make i18n build

- name: Build AppImage
run: |
make appimage

- name: Upload AppImage
uses: actions/upload-artifact@v2
with:
name: kosmorro.AppImage
path: dist/kosmorro-latest-x86_64.AppImage

- name: Upload AppImage version synchronization file
uses: actions/upload-artifact@v2
with:
name: kosmorro.AppImage.zsync
path: dist/kosmorro-latest-x86_64.AppImage.zsync

+ 6
- 0
.gitignore Bestand weergeven

@@ -17,3 +17,9 @@ coverage.xml

# GitPod-specific:
/.vscode/**

# AppImage builds
/AppDir
/appimage-builder-cache
*.AppImage
*.AppImage.zsync

+ 66
- 0
AppImageBuilder.yml Bestand weergeven

@@ -0,0 +1,66 @@
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details
version: 1

script: |
mkdir -p build/AppDir build/AppDir/usr/share/icons/hicolor/scalable/apps
cp _kosmorro/assets/svg/kosmorro-icon.svg build/AppDir/usr/share/icons/hicolor/scalable/apps/kosmorro.svg
pip3 install --isolated --root="./build/AppDir" ./dist/kosmorro-*.whl

AppDir:
path: build/AppDir
app_info:
id: space.kosmorro.cli
name: kosmorro
icon: kosmorro
version: latest
exec: usr/bin/python3
exec_args: $APPDIR/usr/local/bin/kosmorro $@

apt:
arch: amd64
allow_unauthenticated: true
sources:
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal main restricted
- sourceline: deb http://archive.ubuntu.com/ubuntu/ focal universe restricted
include:
- python3
- python3-certifi
- python3-dateutil

files:
include:
- /usr/bin/sh
- /usr/bin/bash
- /usr/bin/env
exclude:
- usr/share/man
- usr/share/doc/*/README.*
- usr/share/doc/*/changelog.*
- usr/share/doc/*/NEWS.*
- usr/share/doc/*/TODO.*

test:
fedora-30:
image: appimagecrafters/tests-env:fedora-33
command: ./AppRun --latitude=50.5824 --longitude=3.0624
use_host_x: true
debian-stable:
image: appimagecrafters/tests-env:debian-stable
command: ./AppRun --latitude=50.5824 --longitude=3.0624
use_host_x: true
archlinux-latest:
image: appimagecrafters/tests-env:archlinux-latest
command: ./AppRun --latitude=50.5824 --longitude=3.0624
use_host_x: true
centos-7:
image: appimagecrafters/tests-env:centos-7
command: ./AppRun --latitude=50.5824 --longitude=3.0624
use_host_x: true
ubuntu-xenial:
image: appimagecrafters/tests-env:ubuntu-xenial
command: ./AppRun --latitude=50.5824 --longitude=3.0624
use_host_x: true

AppImage:
arch: x86_64
update-information: gh-releases-zsync|Kosmorro|kosmorro|latest|Kosmorro-*x86_64.AppImage.zsync

+ 9
- 2
Makefile Bestand weergeven

@@ -14,7 +14,7 @@ messages:
pipenv run python setup.py extract_messages --output-file=_kosmorro/locales/messages.pot

i18n:
python3 setup.py compile_catalog
pipenv run python setup.py compile_catalog

changelog:
conventional-changelog -p angular -i CHANGELOG.md -s
@@ -23,5 +23,12 @@ prepare-release: messages changelog
@echo
@echo "Before tagging, don't forget to update version number in CHANGELOG"

appdir:
appimage-builder --skip-tests
mv *.AppImage dist/
mv *.zsync dist/

appimage: appdir

clean:
rm -rf build dist kosmorro.egg-info manpage/kosmorro.{1,7}{,.html}
rm -rf build dist appimage-builder-cache kosmorro.egg-info manpage/kosmorro.{1,7}{,.html}

+ 3
- 3
_kosmorro/locales/messages.pot Bestand weergeven

@@ -1,14 +1,14 @@
# Translations template for kosmorro.
# Copyright (C) 2021 ORGANIZATION
# Copyright (C) 2022 ORGANIZATION
# This file is distributed under the same license as the kosmorro project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2021.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: kosmorro 0.10.7\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-12-30 12:15+0100\n"
"POT-Creation-Date: 2022-01-02 13:20+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"


Laden…
Annuleren
Opslaan