better publish/build/etc workflow

This commit is contained in:
Lynne Megido 2020-09-06 19:53:19 +10:00
parent ec03321d7b
commit d548d75ef9
Signed by: lynnesbian
GPG Key ID: F0A184B5213D9F90
6 changed files with 57 additions and 3 deletions

30
PKGBUILD Normal file
View File

@ -0,0 +1,30 @@
# Maintainer: Lynnesbian <lynne@bune.city>
pkgname=buypeeb-git # '-bzr', '-git', '-hg' or '-svn'
_srcname=buypeeb-cs
pkgver=r88.ec03321
pkgrel=1
pkgdesc="A simple desktop program for keeping track of Yahoo! Auctions Japan items"
arch=('x86_64')
url="https://git.bune.city/lynnesbian/buypeeb-cs"
license=('GPL3')
depends=('gcc-libs')
makedepends=('git' 'dotnet-sdk') # 'bzr', 'git', 'mercurial' or 'subversion'
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://git.bune.city/lynnesbian/buypeeb-cs.git')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${_srcname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/${_srcname}"
dotnet publish -p:PublishProfile=Linux
}
package() {
cd "$srcdir/${_srcname}/build"
install -D -m755 ./buypeeb -t "${pkgdir}/usr/bin"
}

View File

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
<!-- <SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings> -->
<PublishDir>out/linux/release</PublishDir>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>false</PublishTrimmed>
<!-- <SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings> -->
<PublishDir>out/windows/release</PublishDir>
</PropertyGroup>
</Project>

View File

@ -10,6 +10,12 @@ cd buypeeb-cs
sudo pacman -S dotnet-sdk
dotnet run
```
## quick install (arch linux)
```bash
curl https://git.bune.city/lynnesbian/buypeeb-cs/raw/branch/master/PKGBUILD
makepkg -si # installs to /usr/bin/buypeeb
```
---
## installing prerequisites

View File

@ -1,6 +1,6 @@
dotnet publish -c Release -r win-x64 --output ./out/release/windows/ -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish -p:PublishProfile=Windows
$compress = @{
Path = "out\release\windows\buypeeb.exe"
Path = "out\release\windows\buypeeb.exe"
DestinationPath = "out\release\windows\buypeeb.zip"
}
Compress-Archive @compress

View File

@ -1,3 +1,3 @@
#!/bin/sh
dotnet publish -c Release -r linux-x64 --output ./out/release/linux/ -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish -p:PublishProfile=Linux
tar caf ./out/release/linux/buypeeb.tar.zst ./out/release/linux/buypeeb