Commit 3ac1bad9 authored by ransome1's avatar ransome1
Browse files

CI AUR

parent 8c11b640
# Maintainer: ransome <ransome@uber.space>
pkgname="sleek"
pkgdesc="Todo app based on the todo.txt format for Linux, free and open-source"
arch=("x86_64")
url="https://github.com/ransome1/sleek/"
license=("MIT")
options=(!strip)
makedepends=("yarn" "nodejs<16.0.0")
depends=("electron" "nodejs")
source=("${url}archive/refs/tags/v${pkgver}.zip" "sleek.desktop" "sleek")
build() {
msg2 "Unzipping v${pkgver}.zip"
unzip -o "v${pkgver}.zip"
cd "$srcdir/$pkgname-${pkgver}"
msg2 "Installing node modules"
yarn install
}
package() {
cd "$srcdir/$pkgname-${pkgver}"
msg2 "Building sleek with packaged Electron"
yarn run pack
install -Dm644 "dist/linux-unpacked/resources/app.asar" "$pkgdir/usr/lib/$pkgname.asar"
install -d -Dm644 "${pkgdir}/usr/share"
chmod 755 "${pkgdir}/usr/share"
cp -r "dist/linux-unpacked/${pkgname}" "${pkgdir}/usr/share"
msg2 "Installing LICENSE"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
msg2 "Installing startup script and desktop file"
install -Dm755 "../${pkgname}" -t "$pkgdir/usr/bin/"
install -Dm644 "../${pkgname}.desktop" -t "$pkgdir/usr/share/applications/"
msg2 "Installing icons"
for size in 22 24 32 48 64 128 256 512; do
install -Dm644 "assets/icons/${size}x${size}.png" "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/${pkgname}.png"
done
install -Dm644 "assets/icons/512x512.png" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.png"
}
#! /bin/bash
# shellcheck disable=SC2035
cd ./flatten || exit $?
sha1sum * >sha1sum.txt || exit $?
sha256sum * >sha256sum.txt || exit $?
sha512sum * >sha512sum.txt || exit $?
#! /usr/bin/env python3
from os import environ, makedirs
import re
target = environ.get('TARGET')
if not target:
print('::error ::TARGET is required but missing')
exit(1)
release_tag = environ.get('RELEASE_TAG')
if not release_tag:
print('::error ::RELEASE_TAG is required but missing')
exit(1)
checksum = None
word_splitter = re.compile(r'\s+')
for line in open('sha1sum.txt').readlines():
line = line.strip()
if line.endswith(target):
checksum, _ = word_splitter.split(line)
maintainer = '# Maintainer: Robin Ahle <ransome@uber.space>\n'
readme_url = f'https://raw.githubusercontent.com/ransome1/sleek/{release_tag}/README.md'
license_url = f'https://raw.githubusercontent.com/ransome1/sleek/{release_tag}/LICENSE.md'
opening = maintainer + '\n# This file is automatically generated. Do not edit.\n'
print('Generating PKGBUILD for sleek...')
makedirs('./pkgbuild/sleek', exist_ok=True)
with open('./pkgbuild/sleek/PKGBUILD', 'w') as pkgbuild:
content = opening + '\n'
content += 'pkgname=sleek\n'
content += f'pkgver={release_tag}\n'
source_url = f'https://github.com/ransome1/sleek/archive/{release_tag}.tar.gz'
content += f'source=(sleek-{release_tag}.tar.gz::{source_url})\n'
content += 'sha1sums=(SKIP)\n'
content += open('./github/workflows/PKGBUILD/PKGBUILD').read() + '\n'
pkgbuild.write(content)
print('Generating PKGBUILD for sleek...')
makedirs('./pkgbuild/sleek', exist_ok=True)
with open('./pkgbuild/sleek/PKGBUILD', 'w') as pkgbuild:
content = opening + '\n'
content += 'pkgname=sleek\n'
content += f'pkgver={release_tag}\n'
source_url_prefix = f'https://github.com/ransome1/sleek/releases/download/{release_tag}'
source_url = f'{source_url_prefix}/sleek-{target}'
supported_completions = ['bash', 'fish', 'zsh']
completion_source = ' '.join(
f'completion.{release_tag}.{ext}::{source_url_prefix}/completion.{ext}'
for ext in supported_completions
)
content += f'source=(sleek-{checksum}::{source_url} {completion_source} {readme_url} {license_url})\n'
content += f'_checksum={checksum}\n'
completion_checksums = ' '.join('SKIP' for _ in supported_completions)
content += f'_completion_checksums=({completion_checksums})\n'
content += open('./github/workflows/PKGBUILD/PKGBUILD').read() + '\n'
pkgbuild.write(content)
#!/bin/sh
export AUR=true
exec electron /usr/lib/sleek.asar "$@"
[Desktop Entry]
Name=sleek
Exec=/usr/bin/sleek
Terminal=false
Type=Application
Icon=sleek
Comment=Todo app based on the todo.txt format for Linux, free and open-source
Categories=ProjectManagement
......@@ -18,7 +18,6 @@ flatpak/generated-sources.json
flatpak/com.github.ransome1.sleek.yml
assets/icons/bak
squashfs-root/
src/__tests__
.eslintrc.json
build/
package-lock.json
......
{
"name": "sleek",
"productName": "sleek",
"version": "1.0.6-2",
"version": "1.0.6",
"description": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source",
"synopsis": "Todo app based on todo.txt for Linux, Windows and MacOS, free and open-source",
"category": "ProjectManagement",
......
......@@ -243,7 +243,6 @@ function generateTableRow(todo) {
let todoTableBodyCellText = todoTableBodyCellTextTemplate.cloneNode(true);
let tableContainerCategories = tableContainerCategoriesTemplate.cloneNode(true);
let todoTableBodyCellPriority = todoTableBodyCellPriorityTemplate.cloneNode(true);
//let todoTableBodyCellSpacer = todoTableBodyCellSpacerTemplate.cloneNode(true);
let todoTableBodyCellDueDate = todoTableBodyCellDueDateTemplate.cloneNode(true);
let todoTableBodyCellRecurrence = todoTableBodyCellRecurrenceTemplate.cloneNode(true);
let todoTableBodyCellArchive = todoTableBodyCellArchiveTemplate.cloneNode(true);
......@@ -261,10 +260,7 @@ function generateTableRow(todo) {
if(todo.priority && userData.sortBy==="priority") {
todoTableBodyCellPriority.setAttribute("class", "cell priority " + todo.priority);
todoTableBodyRow.appendChild(todoTableBodyCellPriority);
} /*else if(!todo.priority && userData.sortBy==="priority") {
todoTableBodyCellSpacer.setAttribute("class", "cell spacer");
todoTableBodyRow.appendChild(todoTableBodyCellSpacer);
}*/
}
// add the checkbox
if(todo.complete==true) {
todoTableBodyCellCheckbox.setAttribute("title", translations.inProgress);
......@@ -367,7 +363,6 @@ function generateTableRow(todo) {
todoContext.style.left = event.x + "px";
todoContext.style.top = event.y + "px";
todoContext.classList.toggle("is-active");
todoContext.setAttribute("data-item", todo.toString())
// click on use as template option
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment