Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Desktop Entry and AppStream #236

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions io.github.liftoff_app.liftoff.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Created with jdDesktopEntryEdit 1.1
[Desktop Entry]
Type=Application
Name=Liftoff
Comment=A mobile client for Lemmy
Icon=io.github.liftoff_app.liftoff
TryExec=liftoff
Exec=liftoff
Categories=Network;
91 changes: 91 additions & 0 deletions io.github.liftoff_app.liftoff.metainfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version='1.0' encoding='utf-8'?>
<component type="desktop">
<!--Created with jdAppStreamEdit 7.0-->
<id>io.github.liftoff_app.liftoff</id>
<name>Liftoff</name>
<summary>A mobile client for lemmy</summary>
<developer_name>liftoff-app</developer_name>
<launchable type="desktop-id">io.github.liftoff_app.liftoff.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0</project_license>
<description>
<p>A mobile client for lemmy</p>
</description>
<screenshots>
<screenshot type="default">
<caption>Card View</caption>
<image type="source">https://user-images.githubusercontent.com/6200670/248518597-58298508-155b-431e-9538-ead6790a7a20.png</image>
</screenshot>
<screenshot>
<caption>Compact</caption>
<image type="source">https://user-images.githubusercontent.com/6200670/248518947-132d9e10-15b2-4f4e-abd4-bcf8e6de8fab.png</image>
</screenshot>
<screenshot>
<caption>Search</caption>
<image type="source">https://user-images.githubusercontent.com/6200670/248518961-e69ebc63-958e-4c1f-b496-df650c09c8c4.png</image>
</screenshot>
</screenshots>
<releases>
<release version="v0.10.4" date="2023-07-03" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.10.4</url>
</release>
<release version="v0.10.3" date="2023-07-01" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.10.3</url>
</release>
<release version="v0.10.1" date="2023-07-01" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.10.1</url>
</release>
<release version="v0.9.19" date="2023-06-29" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.19</url>
</release>
<release version="v0.9.18" date="2023-06-27" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.18</url>
</release>
<release version="v0.9.15" date="2023-06-27" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.15</url>
</release>
<release version="v0.9.14" date="2023-06-26" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.14</url>
</release>
<release version="v0.9.13" date="2023-06-26" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.13</url>
</release>
<release version="v0.9.12" date="2023-06-25" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.12</url>
</release>
<release version="v0.9.11" date="2023-06-24" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.11</url>
</release>
<release version="v0.9.8" date="2023-06-24" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.8</url>
</release>
<release version="v0.9.7" date="2023-06-23" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.7</url>
</release>
<release version="v0.9.6" date="2023-06-23" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.6</url>
</release>
<release version="v0.9.5" date="2023-06-22" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.5</url>
</release>
<release version="v0.9.4" date="2023-06-22" type="stable">
<url>https://github.com/liftoff-app/liftoff/releases/tag/v0.9.4</url>
</release>
</releases>
<url type="homepage">https://github.com/liftoff-app/liftoff</url>
<url type="bugtracker">https://github.com/liftoff-app/liftoff/issues</url>
<categories>
<category>Network</category>
</categories>
<recommends>
<control>touch</control>
</recommends>
<supports>
<control>pointing</control>
<control>keyboard</control>
</supports>
<content_rating type="oars-1.1"/>
<provides>
<binary>liftoff</binary>
</provides>
</component>
33 changes: 33 additions & 0 deletions scripts/release.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,39 @@ Future<void> updateChangelog(Version version) async {

await File('fastlane/metadata/android/en-US/changelogs/${version.code}.txt')
.writeAsString(currentChangelog.split('\n').skip(2).join('\n'));

var appStreamList = new XmlElement(new XmlName('ul'));
currentChangelog.split('\n').forEach((String element) {
if (element.isNotEmpty && element.startsWith('-')) {
var appStreamListElement = new XmlElement(new XmlName('li'));
appStreamListElement.innerText = element.substring(2);
appStreamList.children.add(appStreamListElement);
}
});

var appStreamDescription = new XmlElement(new XmlName('description'));
appStreamDescription.children.add(appStreamList);

var appStreamURL = new XmlElement(new XmlName('url'));
appStreamURL.innerText =
'https://github.com/liftoff-app/liftoff/releases/tag/v${version.toStringNoCode()}';

var currentRelaseTag = new XmlElement(new XmlName('release'));
currentRelaseTag.setAttribute('version', 'v${version.toStringNoCode()}');
currentRelaseTag.setAttribute('date', dateString);
currentRelaseTag.setAttribute('type', 'stable');
currentRelaseTag.children.add(appStreamURL);
currentRelaseTag.children.add(appStreamDescription);

final appStreamFile = File('io.github.liftoff_app.liftoff.metainfo.xml');
var appStreamXML = XmlDocument.parse(await appStreamFile.readAsString());
var releasesTag = appStreamXML.rootElement.getElement('releases');
if (releasesTag != null) {
releasesTag.children.insert(0, currentRelaseTag);
} else {
print("Can't find releases tag");
}
appStreamFile.writeAsString(appStreamXML.toXmlString(pretty: true));
}

Future<void> runGitCommands(Version version) async {
Expand Down