new ebuild: dev-embedded/esphome-desktop-bin
yandex-music / check-and-update (push) Successful in 2m19s
github-release / check-and-update (push) Successful in 28s
esphome-desktop-bin / update (push) Successful in 28s
github-release / check-and-update (push) Successful in 30s
opencode-desktop-bin / update (push) Successful in 31s
yandex-music / check-and-update (push) Successful in 2m19s
github-release / check-and-update (push) Successful in 28s
esphome-desktop-bin / update (push) Successful in 28s
github-release / check-and-update (push) Successful in 30s
opencode-desktop-bin / update (push) Successful in 31s
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
name: "Determine package state"
|
||||
description: "Check whether the requested release needs a new ebuild or a manifest update"
|
||||
inputs:
|
||||
atom:
|
||||
description: "category/name package atom"
|
||||
required: true
|
||||
version:
|
||||
description: "release version without the v prefix"
|
||||
required: true
|
||||
forced:
|
||||
description: "true when the version was supplied manually"
|
||||
required: false
|
||||
default: "false"
|
||||
arch:
|
||||
description: "architecture suffix used in the distfile name"
|
||||
required: false
|
||||
default: "amd64"
|
||||
outputs:
|
||||
eligible:
|
||||
description: "false when the requested release is older than the newest ebuild"
|
||||
value: ${{ steps.state.outputs.eligible }}
|
||||
up_to_date:
|
||||
description: "true when the ebuild and its Manifest entry already exist"
|
||||
value: ${{ steps.state.outputs.up_to_date }}
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: state
|
||||
shell: bash
|
||||
env:
|
||||
ATOM: ${{ inputs.atom }}
|
||||
VERSION: ${{ inputs.version }}
|
||||
FORCED: ${{ inputs.forced }}
|
||||
ARCH: ${{ inputs.arch }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
name="${ATOM##*/}"
|
||||
ebuild="${ATOM}/${name}-${VERSION}.ebuild"
|
||||
dist="${name}-${VERSION}-${ARCH}.deb"
|
||||
|
||||
shopt -s nullglob
|
||||
existing=( "${ATOM}/${name}-"*.ebuild )
|
||||
highest_existing=""
|
||||
if (( ${#existing[@]} > 0 )); then
|
||||
highest_existing=$(
|
||||
printf '%s\n' "${existing[@]}" \
|
||||
| sed -e "s|^.*/${name}-||" -e 's|\.ebuild$||' \
|
||||
| sort -V \
|
||||
| tail -n 1
|
||||
)
|
||||
fi
|
||||
|
||||
eligible=true
|
||||
if [[ "${FORCED}" != "true" && -n "${highest_existing}" ]]; then
|
||||
highest=$(printf '%s\n%s\n' "${highest_existing}" "${VERSION}" | sort -V | tail -n 1)
|
||||
if [[ "${highest}" != "${VERSION}" ]]; then
|
||||
echo "Selected release ${VERSION} is older than ${highest_existing}; skipping" >&2
|
||||
eligible=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "${ebuild}" ]] \
|
||||
&& grep -q "^DIST ${dist} " "${ATOM}/Manifest" 2>/dev/null; then
|
||||
up_to_date=true
|
||||
else
|
||||
up_to_date=false
|
||||
fi
|
||||
|
||||
echo "eligible=${eligible}" >> "${GITHUB_OUTPUT}"
|
||||
echo "up_to_date=${up_to_date}" >> "${GITHUB_OUTPUT}"
|
||||
@@ -5,7 +5,7 @@ inputs:
|
||||
description: "GitHub repository in owner/name form"
|
||||
required: true
|
||||
assets:
|
||||
description: "space separated release asset names that must be available"
|
||||
description: "space separated release asset names; {version} and {tag} are expanded"
|
||||
required: false
|
||||
default: ""
|
||||
version:
|
||||
@@ -76,6 +76,10 @@ runs:
|
||||
tag="v${version}"
|
||||
available=true
|
||||
for asset in ${assets}; do
|
||||
# Allow version-dependent asset names such as
|
||||
# "ESPHome.Device.Builder_{version}_amd64.deb".
|
||||
asset="${asset//'{version}'/${version}}"
|
||||
asset="${asset//'{tag}'/${tag}}"
|
||||
url="https://github.com/${repo}/releases/download/${tag}/${asset}"
|
||||
echo "Checking ${url}"
|
||||
if ! curl -fsSIL -o /dev/null "${url}"; then
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
name: esphome-desktop-bin
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Version to publish (may include leading v); empty means detect the latest"
|
||||
required: false
|
||||
default: ""
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
schedule:
|
||||
# Releases are infrequent; hourly polling is more than enough.
|
||||
# Keep away from the yandex-music (:00) and opencode (:15) runs.
|
||||
- cron: "30 * * * *"
|
||||
|
||||
concurrency:
|
||||
group: esphome-desktop-bin
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
update:
|
||||
uses: ./.gitea/workflows/github-release.yaml
|
||||
with:
|
||||
repository: esphome/esphome-desktop
|
||||
atom: dev-embedded/esphome-desktop-bin
|
||||
assets: ESPHome.Device.Builder_{version}_amd64.deb
|
||||
keep: "3"
|
||||
version: ${{ inputs.version || '' }}
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,143 @@
|
||||
name: github-release
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
repository:
|
||||
description: "GitHub repository in owner/name form"
|
||||
required: true
|
||||
type: string
|
||||
atom:
|
||||
description: "category/name package atom"
|
||||
required: true
|
||||
type: string
|
||||
assets:
|
||||
description: "space separated release asset names; {version} and {tag} are expanded"
|
||||
required: true
|
||||
type: string
|
||||
keep:
|
||||
description: "number of newest ebuild versions to keep"
|
||||
required: false
|
||||
default: "3"
|
||||
type: string
|
||||
version:
|
||||
description: "force a version (may include a leading v); empty means detect the latest"
|
||||
required: false
|
||||
default: ""
|
||||
type: string
|
||||
arch:
|
||||
description: "architecture suffix used in distfile names"
|
||||
required: false
|
||||
default: "amd64"
|
||||
type: string
|
||||
secrets:
|
||||
GH_TOKEN:
|
||||
description: "optional GitHub token to raise API rate limits"
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
check-and-update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Fetch latest GitHub release
|
||||
id: release
|
||||
uses: ./.gitea/actions/fetch-github-release
|
||||
with:
|
||||
repository: ${{ inputs.repository }}
|
||||
assets: ${{ inputs.assets }}
|
||||
version: ${{ inputs.version }}
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Determine package state
|
||||
id: state
|
||||
if: steps.release.outputs.available == 'true'
|
||||
uses: ./.gitea/actions/determine-package-state
|
||||
with:
|
||||
atom: ${{ inputs.atom }}
|
||||
version: ${{ steps.release.outputs.version }}
|
||||
forced: ${{ steps.release.outputs.forced }}
|
||||
arch: ${{ inputs.arch }}
|
||||
|
||||
- name: Create ebuild for latest version
|
||||
id: latest
|
||||
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true'
|
||||
uses: ./.gitea/actions/copy-latest-ebuild-as
|
||||
with:
|
||||
atom: ${{ inputs.atom }}
|
||||
version: ${{ steps.release.outputs.version }}
|
||||
|
||||
- name: Keep only the newest ebuilds
|
||||
id: prune
|
||||
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true' && steps.release.outputs.forced != 'true'
|
||||
uses: ./.gitea/actions/prune-ebuilds
|
||||
with:
|
||||
atom: ${{ inputs.atom }}
|
||||
keep: ${{ inputs.keep }}
|
||||
|
||||
- name: Build new manifests
|
||||
if: >-
|
||||
steps.release.outputs.available == 'true' &&
|
||||
steps.state.outputs.eligible == 'true' &&
|
||||
(steps.latest.outputs.message != '' ||
|
||||
steps.prune.outputs.message != '' ||
|
||||
steps.state.outputs.up_to_date != 'true')
|
||||
uses: ./.gitea/actions/pkgdev-manifest
|
||||
with:
|
||||
atom: ${{ inputs.atom }}
|
||||
cache-key: ${{ steps.release.outputs.version }}
|
||||
|
||||
- name: Check repo for validity
|
||||
if: >-
|
||||
steps.release.outputs.available == 'true' &&
|
||||
steps.state.outputs.eligible == 'true' &&
|
||||
(steps.latest.outputs.message != '' ||
|
||||
steps.prune.outputs.message != '' ||
|
||||
steps.state.outputs.up_to_date != 'true')
|
||||
uses: pkgcore/pkgcheck-action@v1
|
||||
with:
|
||||
args: --keywords=-RedundantVersion ${{ inputs.atom }}
|
||||
|
||||
- name: Check for changes
|
||||
id: changes
|
||||
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true'
|
||||
shell: bash
|
||||
env:
|
||||
ATOM: ${{ inputs.atom }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ -n "$(git status --porcelain -- "${ATOM}")" ]]; then
|
||||
echo "changed=true" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "changed=false" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
- name: Compose commit message
|
||||
id: commit
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
shell: bash
|
||||
env:
|
||||
ATOM: ${{ inputs.atom }}
|
||||
ADDED: ${{ steps.latest.outputs.message }}
|
||||
DROPPED: ${{ steps.prune.outputs.message }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
message="${ATOM}"
|
||||
[[ -n "${DROPPED}" ]] && message+=" ${DROPPED}"
|
||||
[[ -n "${ADDED}" ]] && message+=" ${ADDED}"
|
||||
if [[ "${message}" == "${ATOM}" ]]; then
|
||||
message+=" update manifest"
|
||||
fi
|
||||
echo "message=${message}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Commit changes
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: ${{ inputs.atom }}
|
||||
author_name: Automation
|
||||
author_email: noreply@ratigorsk-12.ru
|
||||
message: ${{ steps.commit.outputs.message }}
|
||||
push: true
|
||||
@@ -19,141 +19,12 @@ concurrency:
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
check-and-update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Fetch latest GitHub release
|
||||
id: release
|
||||
uses: ./.gitea/actions/fetch-github-release
|
||||
update:
|
||||
uses: ./.gitea/workflows/github-release.yaml
|
||||
with:
|
||||
repository: anomalyco/opencode
|
||||
atom: dev-util/opencode-desktop-bin
|
||||
assets: opencode-desktop-linux-amd64.deb
|
||||
version: ${{ inputs.version || '' }}
|
||||
env:
|
||||
# Optional: raises the GitHub API rate limit from 60 to 5000 req/h.
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Determine package state
|
||||
id: state
|
||||
if: steps.release.outputs.available == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
atom="dev-util/opencode-desktop-bin"
|
||||
name="opencode-desktop-bin"
|
||||
version="${{ steps.release.outputs.version }}"
|
||||
forced="${{ steps.release.outputs.forced }}"
|
||||
ebuild="${atom}/${name}-${version}.ebuild"
|
||||
dist="${name}-${version}-amd64.deb"
|
||||
|
||||
shopt -s nullglob
|
||||
existing=( "${atom}/${name}-"*.ebuild )
|
||||
highest_existing=""
|
||||
if (( ${#existing[@]} > 0 )); then
|
||||
highest_existing=$(
|
||||
printf '%s\n' "${existing[@]}" \
|
||||
| sed -e "s|^.*/${name}-||" -e 's|\.ebuild$||' \
|
||||
| sort -V \
|
||||
| tail -n 1
|
||||
)
|
||||
fi
|
||||
|
||||
eligible=true
|
||||
if [[ "${forced}" != "true" && -n "${highest_existing}" ]]; then
|
||||
highest=$(printf '%s\n%s\n' "${highest_existing}" "${version}" | sort -V | tail -n 1)
|
||||
if [[ "${highest}" != "${version}" ]]; then
|
||||
echo "Selected release ${version} is older than ${highest_existing}; skipping" >&2
|
||||
eligible=false
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "${ebuild}" ]] \
|
||||
&& grep -q "^DIST ${dist} " "${atom}/Manifest" 2>/dev/null; then
|
||||
up_to_date=true
|
||||
else
|
||||
up_to_date=false
|
||||
fi
|
||||
|
||||
echo "eligible=${eligible}" >> "${GITHUB_OUTPUT}"
|
||||
echo "up_to_date=${up_to_date}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Create ebuild for latest version
|
||||
id: latest
|
||||
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true'
|
||||
uses: ./.gitea/actions/copy-latest-ebuild-as
|
||||
with:
|
||||
atom: dev-util/opencode-desktop-bin
|
||||
version: ${{ steps.release.outputs.version }}
|
||||
|
||||
- name: Keep only the newest ebuilds
|
||||
id: prune
|
||||
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true' && steps.release.outputs.forced != 'true'
|
||||
uses: ./.gitea/actions/prune-ebuilds
|
||||
with:
|
||||
atom: dev-util/opencode-desktop-bin
|
||||
keep: "3"
|
||||
|
||||
- name: Build new manifests
|
||||
if: >-
|
||||
steps.release.outputs.available == 'true' &&
|
||||
steps.state.outputs.eligible == 'true' &&
|
||||
(steps.latest.outputs.message != '' ||
|
||||
steps.prune.outputs.message != '' ||
|
||||
steps.state.outputs.up_to_date != 'true')
|
||||
uses: ./.gitea/actions/pkgdev-manifest
|
||||
with:
|
||||
atom: dev-util/opencode-desktop-bin
|
||||
cache-key: ${{ steps.release.outputs.version }}
|
||||
|
||||
- name: Check repo for validity
|
||||
if: >-
|
||||
steps.release.outputs.available == 'true' &&
|
||||
steps.state.outputs.eligible == 'true' &&
|
||||
(steps.latest.outputs.message != '' ||
|
||||
steps.prune.outputs.message != '' ||
|
||||
steps.state.outputs.up_to_date != 'true')
|
||||
uses: pkgcore/pkgcheck-action@v1
|
||||
with:
|
||||
args: --keywords=-RedundantVersion dev-util/opencode-desktop-bin
|
||||
|
||||
- name: Check for changes
|
||||
id: changes
|
||||
if: steps.release.outputs.available == 'true' && steps.state.outputs.eligible == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ -n "$(git status --porcelain -- dev-util/opencode-desktop-bin)" ]]; then
|
||||
echo "changed=true" >> "${GITHUB_OUTPUT}"
|
||||
else
|
||||
echo "changed=false" >> "${GITHUB_OUTPUT}"
|
||||
fi
|
||||
|
||||
- name: Compose commit message
|
||||
id: commit
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
shell: bash
|
||||
env:
|
||||
ADDED: ${{ steps.latest.outputs.message }}
|
||||
DROPPED: ${{ steps.prune.outputs.message }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
message="dev-util/opencode-desktop-bin"
|
||||
[[ -n "${DROPPED}" ]] && message+=" ${DROPPED}"
|
||||
[[ -n "${ADDED}" ]] && message+=" ${ADDED}"
|
||||
if [[ "${message}" == "dev-util/opencode-desktop-bin" ]]; then
|
||||
message+=" update manifest"
|
||||
fi
|
||||
echo "message=${message}" >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Commit changes
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: dev-util/opencode-desktop-bin
|
||||
author_name: Automation
|
||||
author_email: noreply@ratigorsk-12.ru
|
||||
message: ${{ steps.commit.outputs.message }}
|
||||
push: true
|
||||
version: ${{ inputs.version || '' }}
|
||||
secrets: inherit
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DIST esphome-desktop-bin-1.2.0-amd64.deb 135932606 BLAKE2B fb296ef3c2c55ee06a44a78d08776b6cede48239df972456e42183cf0cd4a2f857ae8ff065d0357ce453679c6ff00fed705c8b17934df728591280e43cc722dc SHA512 9d06415e0057d711069509767489a6ab31d1e46b41bce257809a6cecfa59a8f5deea2dfbbf9f5024ecb05f2397c627750bc5d055313f24241f61b3775d808127
|
||||
@@ -0,0 +1,86 @@
|
||||
# Copyright 2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop unpacker xdg
|
||||
|
||||
DESCRIPTION="Desktop application for ESPHome"
|
||||
HOMEPAGE="
|
||||
https://esphome.io/
|
||||
https://github.com/esphome/esphome-desktop
|
||||
"
|
||||
SRC_URI="
|
||||
amd64? (
|
||||
https://github.com/esphome/esphome-desktop/releases/download/v${PV}/ESPHome.Device.Builder_${PV}_amd64.deb
|
||||
-> ${P}-amd64.deb
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64"
|
||||
RESTRICT="mirror strip"
|
||||
|
||||
QA_PREBUILT="*"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2
|
||||
dev-libs/libayatana-appindicator
|
||||
net-libs/libsoup:3.0
|
||||
net-libs/webkit-gtk:4.1
|
||||
sys-apps/dbus
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/gtk+:3
|
||||
"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Mirror the AppImage layout: bin/esphome-desktop resolves its resources
|
||||
# as ../lib/esphome-desktop, so the entire bundle can live under /opt.
|
||||
mkdir -p "${S}/opt/esphome-desktop/bin" \
|
||||
"${S}/opt/esphome-desktop/lib" || die
|
||||
mv "${S}/usr/bin/esphome-desktop" \
|
||||
"${S}/opt/esphome-desktop/bin/esphome-desktop" || die
|
||||
mv "${S}/usr/lib/ESPHome Device Builder" \
|
||||
"${S}/opt/esphome-desktop/lib/esphome-desktop" || die
|
||||
|
||||
# Keep the installed desktop file name space-free.
|
||||
mv "${S}/usr/share/applications/ESPHome Device Builder.desktop" \
|
||||
"${S}/usr/share/applications/esphome-desktop.desktop" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
exeinto /opt/esphome-desktop/bin
|
||||
doexe opt/esphome-desktop/bin/esphome-desktop
|
||||
|
||||
insinto /opt/esphome-desktop/lib
|
||||
doins -r opt/esphome-desktop/lib/esphome-desktop
|
||||
# doins defaults to 0644; the bundled interpreter and entry points
|
||||
# must remain executable.
|
||||
fperms -R 0755 /opt/esphome-desktop/lib/esphome-desktop/python/bin
|
||||
|
||||
dosym ../../opt/esphome-desktop/bin/esphome-desktop /usr/bin/esphome-desktop
|
||||
|
||||
domenu usr/share/applications/esphome-desktop.desktop
|
||||
|
||||
insinto /usr/share/icons
|
||||
doins -r usr/share/icons/hicolor
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_desktop_database_update
|
||||
xdg_icon_cache_update
|
||||
|
||||
elog "Install dev-vcs/git if you want to use external components,"
|
||||
elog "remote github:// packages, voice models, or other features that"
|
||||
elog "clone dependencies."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_desktop_database_update
|
||||
xdg_icon_cache_update
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>noreply@ratigorsk-12.ru</email>
|
||||
<name>Ratigorsk Auto</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/esphome/esphome-desktop/issues</bugs-to>
|
||||
<remote-id type="github">esphome/esphome-desktop</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user