Skip to content

Commit

Permalink
use ostree for creating repo #5
Browse files Browse the repository at this point in the history
  • Loading branch information
prolic committed Nov 15, 2024
1 parent 55dde09 commit ddbff85
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 56 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/continous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,16 @@ jobs:
TODAY=$(date +%Y-%m-%d)
APPDATA="flatpak/com.futrnostr.futr.appdata.xml"
# Ensure the basic structure exists
# Copy template if appdata.xml doesn't exist
if [ ! -f "$APPDATA" ]; then
mkdir -p $(dirname "$APPDATA")
cat > "$APPDATA" << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<components version="0.8">
<component type="desktop-application">
<id>com.futrnostr.futr</id>
<releases>
</releases>
</component>
</components>
EOF
cp flatpak/com.futrnostr.futr.appdata.xml.template "$APPDATA"
fi
# Just add/update the continuous release
sed -i "/<releases>/a \ <release version=\"continuous\" date=\"$TODAY\">\n <description>\n <p>Development build</p>\n </description>\n </release>" "$APPDATA"
# Remove any existing continuous release entry
sed -i '/<release version="continuous"/,/<\/release>/d' "$APPDATA"
# Add new continuous release entry at the top of releases section
sed -i "/<releases>/a \ <release version=\"continuous\" date=\"$TODAY\" type=\"development\">\n <description>\n <p>Development build from master branch</p>\n <p>Commit: ${{ github.sha }}</p>\n </description>\n </release>" "$APPDATA"
- name: Build Flatpak
run: ./build-flatpak.sh
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,18 @@ jobs:
- name: Build with Cabal
run: cabal build

- name: Update Repository appdata.xml
- name: Update appdata.xml
run: |
VERSION=${GITHUB_REF#refs/tags/v} # Extract version from tag
TODAY=$(date +%Y-%m-%d)
APPDATA="flatpak/com.futrnostr.futr.appdata.xml"
# Ensure the basic structure exists
# Copy template if appdata.xml doesn't exist
if [ ! -f "$APPDATA" ]; then
mkdir -p $(dirname "$APPDATA")
cat > "$APPDATA" << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<components version="0.8">
<component type="desktop-application">
<id>com.futrnostr.futr</id>
<releases>
</releases>
</component>
</components>
EOF
cp flatpak/com.futrnostr.futr.appdata.xml.template "$APPDATA"
fi
# Add the new release entry at the top of the releases section
# Add new release entry at the top of releases section
sed -i "/<releases>/a \ <release version=\"$VERSION\" date=\"$TODAY\">\n <description>\n <p>Release version $VERSION</p>\n </description>\n </release>" "$APPDATA"
- name: Build Flatpak
Expand Down
28 changes: 0 additions & 28 deletions flatpak/com.futrnostr.futr.appdata.xml

This file was deleted.

24 changes: 24 additions & 0 deletions flatpak/com.futrnostr.futr.appdata.xml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<components version="0.8">
<component type="desktop-application">
<id>com.futrnostr.futr</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<name>Futr</name>
<summary>Native nostr client for your Linux desktop</summary>
<description>
<p>
Futr is a native nostr client for Linux desktops. It provides a user-friendly interface for interacting with the nostr protocol, allowing users to publish and read posts, follow other users, and participate in the decentralized social network. Built with Haskell and Qt5, Futr offers a fast and responsive experience while maintaining the principles of privacy and censorship resistance that are core to the nostr ecosystem.
</p>
</description>
<url type="homepage">https://futrnostr.com</url>
<screenshots>
<screenshot type="default">
<image>https://image.nostr.build/8f5e8a02465f0a9f01b68e2038a259867a7ac8fd4aa274463e8d047a36b188a5.png</image>
<caption>Main window of Futr</caption>
</screenshot>
</screenshots>
<releases>
</releases>
</component>
</components>

0 comments on commit ddbff85

Please sign in to comment.