Compare commits

...

2 Commits

Author SHA1 Message Date
Brieuc Dubois 2de3daed2c PKGBUILD in ci
Build releases / build-docker (./backend, focus-backend) (push) Has been cancelled Details
Build releases / build-docker (./frontend, ./frontend/Dockerfile, focus-frontend) (push) Has been cancelled Details
Build releases / build-tauri (push) Has been cancelled Details
Build releases / build-docker (., focu) (push) Has been cancelled Details
Build releases / build-server (push) Has been cancelled Details
2024-01-14 13:49:03 +01:00
Brieuc Dubois dc08dc03a4 PKGBUILD for server 2024-01-14 02:33:46 +01:00
8 changed files with 209 additions and 53 deletions

View File

@ -107,6 +107,81 @@ jobs:
name: Focus ${{ steps.tagName.outputs.tag }}
prerelease: true
files: |-
frontend/src-tauri/target/release/focus
frontend/src-tauri/target/release/focus-desktop
frontend/src-tauri/target/release/bundle/deb/*.deb
frontend/src-tauri/target/release/bundle/appimage/*.AppImage
- name: Generate sha256sum
run: |
mkdir -p ./ci/pkgbuild/desktop-bin
sha256 frontend/src-tauri/target/release/bundle/deb/*.deb > ./ci/pkgbuild/desktop-bin/sha256sum
- name: Generate PKGBUILD
env:
RELEASE_TAG: ${{ steps.tagName.outputs.tag }}
run: ./ci/generate-pkgbuild-desktop.py
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
with:
pkgname: focus-desktop-bin
pkgbuild: ./ci/pkgbuild/desktop-bin/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: Update focus-desktop-bin to ${{ steps.tagName.outputs.tag }}
build-server:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract tag
uses: olegtarasov/get-tag@v2.1.2
id: tagName
with:
tagRegex: "v(.*)"
- name: Set up go
uses: actions/setup-go@v3
with:
go-version: 1.21.5
- name: Build server
run: |
cd backend
go build -o focus-server .
cd ..
- name: Publish server
uses: akkuman/gitea-release-action@v1
with:
name: Focus ${{ steps.tagName.outputs.tag }}
prerelease: true
files: |-
backend/focus-server
- name: Generate sha256sum
run: |
mkdir -p ./ci/pkgbuild/server-bin
sha256 backend/focus-server > ./ci/pkgbuild/server-bin/sha256sum
- name: Generate PKGBUILD
env:
RELEASE_TAG: ${{ steps.tagName.outputs.tag }}
run: ./ci/generate-pkgbuild-server.py
- name: Publish AUR package
uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
with:
pkgname: focus-server-bin
pkgbuild: ./ci/pkgbuild/server-bin/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_KEY }}
commit_message: Update focus-server-bin to ${{ steps.tagName.outputs.tag }}

View File

@ -61,12 +61,15 @@ For other platforms, you can build the desktop app yourself using `npm run tauri
PUBLIC_BACKEND_URL=http://localhost:3000 ./focus
```
#### AUR
### AUR
```sh
yay -S focus-desktop-bin
yay -S focus-desktop-bin # Desktop app
yay -S focus-server-git # Server
```
The server can then be started with `focus-server` or `systemctl start focus-server.service` and the client with `focus`.
### Debug Mode
To run Focus locally, follow these steps:

1
backend/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
focus-server-git

7
backend/LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright © 2023 Brieuc Dubois
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,68 @@
#! /usr/bin/env python3
from os import environ
release_tag = environ.get('RELEASE_TAG')
if not release_tag:
print('::error ::RELEASE_TAG not set')
exit(1)
# TODO
with open('./ci/pkgbuild/desktop-bin/sha256sum', 'r') as f:
sha256sum = f.read().strip()
if not sha256sum:
print('::error ::sha256sum not set')
exit(1)
pkgbuild = f'''\
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-desktop-bin
pkgver={release_tag}
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
url="https://git.bhasher.com/bhasher/focus"
license=('MIT')
provides=("${{pkgname%-bin}}=${{pkgver}}")
conflicts=("${{pkgname%-bin}}")
depends=(
'webkit2gtk'
'gtk3'
'cairo'
'glib2'
'hicolor-icon-theme'
'gdk-pixbuf2'
'libsoup'
'gcc-libs'
'glibc'
'pango'
)
source=(
"focus-desktop_${{pkgver}}_amd64.deb::https://git.bhasher.com/Bhasher/focus/releases/download/v${{pkgver}}/focus-desktop_${{pkgver}}_amd64.deb"
"LICENSE::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
sha256sums=(
'{sha256sum}'
'SKIP'
)
build() {{
bsdtar -xf "${{srcdir}}/data.tar.gz"
}}
package() {{
install -Dm755 "${{srcdir}}/usr/bin/focus-desktop" "${{pkgdir}}/usr/bin/focus-desktop"
install -Dm644 "${{srcdir}}/usr/share/applications/focus-desktop.desktop" "${{pkgdir}}/usr/share/applications/focus-desktop.desktop"
for _icons in 32x32 128x128 256x256@2;do
install -Dm644 "${{srcdir}}/usr/share/icons/hicolor/${{_icons}}/apps/focus-desktop.png" \
-t "${{pkgdir}}/usr/share/icons/hicolor/${{_icons//@2/}}/apps/focus-desktop.png"
done
install -Dm644 "${{srcdir}}/LICENSE" "${{pkgdir}}/usr/share/licenses/${{pkgname}}/LICENSE"
}}
'''
with open('./ci/pkgbuild/desktop-bin/PKGBUILD', 'w') as f:
f.write(pkgbuild)

View File

@ -0,0 +1,50 @@
#! /usr/bin/env python3
from os import environ
release_tag = environ.get('RELEASE_TAG')
if not release_tag:
print('::error ::RELEASE_TAG not set')
exit(1)
# TODO
with open('./ci/pkgbuild/server-bin/sha256sum', 'r') as f:
sha256sum = f.read().strip()
if not sha256sum:
print('::error ::sha256sum not set')
exit(1)
pkgbuild = f'''\
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-server-bin
pkgver={release_tag}
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
url="https://git.bhasher.com/bhasher/focus"
license=('MIT')
provides=("${{pkgname%-bin}}=${{pkgver}}")
conflicts=("${{pkgname%-bin}}")
depends=(
'glibc'
)
source=(
"focus-server::https://git.bhasher.com/Bhasher/focus/releases/download/v${{pkgver}}/focus-server"
"LICENSE::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
sha256sums=(
'{sha256sum}'
'SKIP'
)
package() {{
install -Dm755 "${{srcdir}}/focus-server" "${{pkgdir}}/usr/bin/focus-server"
install -Dm644 "${{srcdir}}/LICENSE" "${{pkgdir}}/usr/share/licenses/${{pkgname}}/LICENSE"
}}
'''
with open('./ci/pkgbuild/server-bin/PKGBUILD', 'w') as f:
f.write(pkgbuild)

View File

@ -1,48 +0,0 @@
# Maintainer: Brieuc Dubois <focus dot aur at bhasher dot com>
pkgname=focus-desktop-bin
pkgver=0.3.2
pkgrel=1
pkgdesc="Focus is an open-source, Kanban-style project management tool, emphasizing simplicity and efficiency."
arch=('x86_64')
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
url="https://git.bhasher.com/bhasher/focus"
depends=(
'webkit2gtk'
'gtk3'
'cairo'
'glib2'
'hicolor-icon-theme'
'gdk-pixbuf2'
'libsoup'
'gcc-libs'
'glibc'
'pango'
)
source=(
"https://git.bhasher.com/Bhasher/focus/releases/download/v${pkgver}/focus_${pkgver}_amd64.deb"
"LICENSE-${pkgver}::https://git.bhasher.com/Bhasher/focus/raw/branch/master/LICENSE.md"
)
sha256sums=(
'64dc3fbd2476ef5ff9b0705c6ec287657ef7ce96c4b72d063088eb05c519f227'
'00f70f9c4cb1c351877b690002c21564dc022f7b5d7fd1273ff52c5911356384'
)
build() {
bsdtar -xf "${srcdir}/data.tar.gz"
}
package() {
install -Dm755 "${srcdir}/usr/bin/focus" "${pkgdir}/usr/bin/focus"
install -Dm644 "${srcdir}/usr/share/applications/focus.desktop" "${pkgdir}/usr/share/applications"
for _icons in 32x32 128x128 256x256@2;do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/focus.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons//@2/}/apps"
done
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@ -8,8 +8,8 @@
"withGlobalTauri": true
},
"package": {
"productName": "Focus",
"version": "0.3.2"
"productName": "Focus-Desktop",
"version": "0.3.3"
},
"tauri": {
"allowlist": {