From 59d4103dba1050548375ba5ebbeb86a7b853b0c5 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 15:33:19 +0500 Subject: [PATCH 01/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 3a22f1a..d9011e9 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -105,10 +105,8 @@ steps: - git push "https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git" "release/$VERSION" - git push -f https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" - release-upload: - image: curlimages/curl:latest - commands: - - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) + # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API + - VERSION=$(cat version.env | grep VERSION | cut -d'=' -f2) - TAG="v$VERSION" - DEB_PATH="../gonets_${VERSION}_amd64.deb" - | @@ -126,4 +124,4 @@ steps: curl -s -X POST \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -F "attachment=@$DEB_PATH" \ - "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets" + "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets" \ No newline at end of file From f4bd09d735aad123292d36284c4f65187f89935c Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 16:11:26 +0500 Subject: [PATCH 02/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index d9011e9..d6f6a21 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -106,9 +106,12 @@ steps: - git push -f https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API - - VERSION=$(cat version.env | grep VERSION | cut -d'=' -f2) + - . ./version.env + - echo "Текущая версия: $VERSION" - TAG="v$VERSION" - DEB_PATH="../gonets_${VERSION}_amd64.deb" + - echo "Путь к файлу: $DEB_PATH" + - ls -l "$DEB_PATH" || echo "Файл не найден по пути: $DEB_PATH" - | curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ @@ -124,4 +127,4 @@ steps: curl -s -X POST \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -F "attachment=@$DEB_PATH" \ - "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets" \ No newline at end of file + "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets" || echo "Ошибка загрузки файла" \ No newline at end of file From 8cf457fa2ed3e863b0a48c3e04cbf697edf5614d Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 16:11:47 +0500 Subject: [PATCH 03/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index d6f6a21..3b5aa79 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -107,7 +107,6 @@ steps: # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API - . ./version.env - - echo "Текущая версия: $VERSION" - TAG="v$VERSION" - DEB_PATH="../gonets_${VERSION}_amd64.deb" - echo "Путь к файлу: $DEB_PATH" From 631139e6298c2909b7229f6619916c1a8df64163 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 16:12:01 +0500 Subject: [PATCH 04/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 3b5aa79..b5c14c2 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -109,7 +109,6 @@ steps: - . ./version.env - TAG="v$VERSION" - DEB_PATH="../gonets_${VERSION}_amd64.deb" - - echo "Путь к файлу: $DEB_PATH" - ls -l "$DEB_PATH" || echo "Файл не найден по пути: $DEB_PATH" - | curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ From 7bf34f498a6580f2adf553997a8b00a4ada72e6b Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 16:12:17 +0500 Subject: [PATCH 05/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index b5c14c2..b518907 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -109,7 +109,6 @@ steps: - . ./version.env - TAG="v$VERSION" - DEB_PATH="../gonets_${VERSION}_amd64.deb" - - ls -l "$DEB_PATH" || echo "Файл не найден по пути: $DEB_PATH" - | curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ From 8c957b0fe36bfd5a2418dd9fb4842af839745d19 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 17:26:14 +0500 Subject: [PATCH 06/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index b518907..8fe64e5 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -16,7 +16,7 @@ steps: # УСТАНОВКА НЕОБХОДИМЫХ ЗАВИСИМОСТЕЙ НА СИСТЕМЕ - apt update - - apt install -y python3 openssh-server tree libnss3 libnss3-dev libnspr4 libnspr4-dev libasound2 libasound2-dev python3.11-venv python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev cmake libgirepository1.0-dev gobject-introspection libcairo2-dev pkg-config python3-dev libdbus-1-dev + - apt install -y python3 curl findutils grep sed openssh-server tree libnss3 libnss3-dev libnspr4 libnspr4-dev libasound2 libasound2-dev python3.11-venv python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev cmake libgirepository1.0-dev gobject-introspection libcairo2-dev pkg-config python3-dev libdbus-1-dev - python3 --version - node -v - npm -v @@ -106,22 +106,26 @@ steps: - git push -f https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API + - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) + - echo "VERSION=$VERSION" > version.env + - . ./version.env - TAG="v$VERSION" - - DEB_PATH="../gonets_${VERSION}_amd64.deb" - - | - curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ + + - DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_*.deb" | head -n 1) + + - if [ ! -f "$DEB_PATH" ]; then echo "❌ .deb файл не найден по пути: $DEB_PATH"; exit 1; fi + + - RELEASE_JSON=$(curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -H "Content-Type: application/json" \ - -d '{ - "tag_name": "'$TAG'", - "name": "Релиз '$TAG'", - "body": "Сборка .deb пакета для версии '$TAG'", - "draft": false, - "prerelease": true - }' || true - - | - curl -s -X POST \ + -d "{\"tag_name\": \"$TAG\", \"name\": \"Релиз $TAG\", \"body\": \"Сборка .deb пакета для версии $TAG\", \"draft\": false, \"prerelease\": true}") + + - RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') + + - if [ -z "$RELEASE_ID" ]; then echo "❌ Не удалось получить ID релиза из ответа: $RELEASE_JSON"; exit 1; fi + + - curl -s -X POST \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -F "attachment=@$DEB_PATH" \ - "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$TAG/assets" || echo "Ошибка загрузки файла" \ No newline at end of file + "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$RELEASE_ID/assets" || echo "❌ Ошибка загрузки файла" \ No newline at end of file From 5cd0a70aa1d899ec02dfc0ea0dca91c459919fe3 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 17:27:49 +0500 Subject: [PATCH 07/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 8fe64e5..d62dfcf 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -106,26 +106,40 @@ steps: - git push -f https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API - - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) - - echo "VERSION=$VERSION" > version.env + VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) + echo "VERSION=$VERSION" > version.env - - . ./version.env - - TAG="v$VERSION" + # Задать переменные + . ./version.env + TAG="v$VERSION" - - DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_*.deb" | head -n 1) + # Найти .deb файл в родительской директории + DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_*.deb" | head -n 1) - - if [ ! -f "$DEB_PATH" ]; then echo "❌ .deb файл не найден по пути: $DEB_PATH"; exit 1; fi + # Проверка наличия файла + if [ ! -f "$DEB_PATH" ]; then + echo "❌ .deb файл не найден по пути: $DEB_PATH" + exit 1 + fi - - RELEASE_JSON=$(curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ + # Создание релиза + RELEASE_JSON=$(curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -H "Content-Type: application/json" \ -d "{\"tag_name\": \"$TAG\", \"name\": \"Релиз $TAG\", \"body\": \"Сборка .deb пакета для версии $TAG\", \"draft\": false, \"prerelease\": true}") - - RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') + # Извлечение ID релиза + RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') - - if [ -z "$RELEASE_ID" ]; then echo "❌ Не удалось получить ID релиза из ответа: $RELEASE_JSON"; exit 1; fi + # Проверка ID + if [ -z "$RELEASE_ID" ]; then + echo "❌ Не удалось получить ID релиза из ответа:" + echo "$RELEASE_JSON" + exit 1 + fi - - curl -s -X POST \ + # Загрузка .deb файла как asset + curl -s -X POST \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -F "attachment=@$DEB_PATH" \ "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$RELEASE_ID/assets" || echo "❌ Ошибка загрузки файла" \ No newline at end of file From 95f226bb7c487c05450e806f3b1883a1f0d0c6c2 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 17:28:52 +0500 Subject: [PATCH 08/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index d62dfcf..adb4cdf 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -106,6 +106,7 @@ steps: - git push -f https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API + - | VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) echo "VERSION=$VERSION" > version.env From c4f0a695dc2436f35846b8de5f66411fabf3d243 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 17:50:08 +0500 Subject: [PATCH 09/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index adb4cdf..6a4f719 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -1,7 +1,3 @@ -when: - event: [push, tag] - branch: main - steps: checkout: image: debian:latest @@ -115,7 +111,7 @@ steps: TAG="v$VERSION" # Найти .deb файл в родительской директории - DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_*.deb" | head -n 1) + DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_amd64.deb" | head -n 1) # Проверка наличия файла if [ ! -f "$DEB_PATH" ]; then From 3bb3eb19c86db2ccffdbc8a15598e2d2763cf78a Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Wed, 2 Jul 2025 18:05:46 +0500 Subject: [PATCH 10/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 6a4f719..75a391d 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -110,32 +110,26 @@ steps: . ./version.env TAG="v$VERSION" - # Найти .deb файл в родительской директории - DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_${VERSION}_amd64.deb" | head -n 1) + DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_*_amd64.deb" | head -n 1) - # Проверка наличия файла if [ ! -f "$DEB_PATH" ]; then echo "❌ .deb файл не найден по пути: $DEB_PATH" exit 1 fi - # Создание релиза RELEASE_JSON=$(curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -H "Content-Type: application/json" \ -d "{\"tag_name\": \"$TAG\", \"name\": \"Релиз $TAG\", \"body\": \"Сборка .deb пакета для версии $TAG\", \"draft\": false, \"prerelease\": true}") - # Извлечение ID релиза RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') - # Проверка ID if [ -z "$RELEASE_ID" ]; then echo "❌ Не удалось получить ID релиза из ответа:" echo "$RELEASE_JSON" exit 1 fi - # Загрузка .deb файла как asset curl -s -X POST \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -F "attachment=@$DEB_PATH" \ From 8043eef048c9df378c3694ef2b1a4569b69209c5 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 10:46:56 +0500 Subject: [PATCH 11/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 75a391d..d37e70f 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -1,3 +1,6 @@ +when: + event: manual + steps: checkout: image: debian:latest From 0af7608d0c16b6d0b3bd3d82fbf96124175eb81f Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 11:13:10 +0500 Subject: [PATCH 12/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index d37e70f..faa1864 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -116,7 +116,7 @@ steps: DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_*_amd64.deb" | head -n 1) if [ ! -f "$DEB_PATH" ]; then - echo "❌ .deb файл не найден по пути: $DEB_PATH" + echo ".deb файл не найден по пути: $DEB_PATH" exit 1 fi @@ -128,7 +128,7 @@ steps: RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') if [ -z "$RELEASE_ID" ]; then - echo "❌ Не удалось получить ID релиза из ответа:" + echo "Не удалось получить ID релиза из ответа:" echo "$RELEASE_JSON" exit 1 fi @@ -136,4 +136,4 @@ steps: curl -s -X POST \ -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ -F "attachment=@$DEB_PATH" \ - "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$RELEASE_ID/assets" || echo "❌ Ошибка загрузки файла" \ No newline at end of file + "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$RELEASE_ID/assets" || echo "Ошибка загрузки файла" \ No newline at end of file From 47d8b2125b013fec61f3f56083b98363a7babda7 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 11:14:00 +0500 Subject: [PATCH 13/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit РАБОЧИЙ КОНФИГ ДЛЯ CI/CD GONETS --- .woodpecker/.woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index faa1864..4faf67d 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -116,7 +116,7 @@ steps: DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_*_amd64.deb" | head -n 1) if [ ! -f "$DEB_PATH" ]; then - echo ".deb файл не найден по пути: $DEB_PATH" + echo " .deb файл не найден по пути: $DEB_PATH" exit 1 fi From 936fc6ba2db1da0f3f83a4a4dfb27f646ddde67d Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 11:14:32 +0500 Subject: [PATCH 14/19] =?UTF-8?q?=D0=A0=D0=90=D0=91=D0=9E=D0=A7=D0=98?= =?UTF-8?q?=D0=99=20=D0=9A=D0=9E=D0=9D=D0=A4=D0=98=D0=93=20=D0=94=D0=9B?= =?UTF-8?q?=D0=AF=20CI/CD=20GONETS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 4faf67d..faa1864 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -116,7 +116,7 @@ steps: DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_*_amd64.deb" | head -n 1) if [ ! -f "$DEB_PATH" ]; then - echo " .deb файл не найден по пути: $DEB_PATH" + echo ".deb файл не найден по пути: $DEB_PATH" exit 1 fi From a7e7676897082d232c008fd90f3dfc87c0b228f5 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 15:19:33 +0500 Subject: [PATCH 15/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 133 ++---------------------------------- 1 file changed, 5 insertions(+), 128 deletions(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index faa1864..d5db2cd 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -4,136 +4,13 @@ when: steps: checkout: image: debian:latest - environment: - GONETS: - from_secret: GONETS + secrets: [forgejo_token] commands: # ПОДГОТОВКА ГИТА И КЛОНИРОВАНИЕ GONETS - apt update - apt install -y git git-lfs - git lfs install - - # УСТАНОВКА НЕОБХОДИМЫХ ЗАВИСИМОСТЕЙ НА СИСТЕМЕ - - apt update - - apt install -y python3 curl findutils grep sed openssh-server tree libnss3 libnss3-dev libnspr4 libnspr4-dev libasound2 libasound2-dev python3.11-venv python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev cmake libgirepository1.0-dev gobject-introspection libcairo2-dev pkg-config python3-dev libdbus-1-dev - - python3 --version - - node -v - - npm -v - - # ПОДГОТОВКА СПИСКА PYTHON ЗАВИСИМОСТЕЙ GONETS - - rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED - - rm -rf /root/.local/share/pypoetry - - rm -rf /root/.poetry - - rm -rf /usr/bin/poetry - - pip install pipx - - pipx ensurepath - - pipx install poetry - - echo 'export PATH="$HOME/.local/bin:$PATH"' >> /root/.bashrc - - . /root/.bashrc - - poetry --version - - cd SRV - - poetry env activate - - poetry add poetry-plugin-export - - poetry install - - poetry self update - - rm -f requirements.txt - - poetry run poetry export -f requirements.txt --output requirements.txt --without-hashes - - # ПОДГОТОВКА И СБОРКА FRONTEND ЧАСТИ GONETS - - pwd - - cd .. - - pwd - - cd FRONT/DEV - - pwd - - npm install - - npm run package - - cd dist/gonets-linux-x64/resources/app - - pwd - - npm run build - - sed -i 's#href="/assets/#href="./assets/#g' dist/index.html - - sed -i 's#src="/assets/#src="./assets/#g' dist/index.html - - cd ../../../../.. - - pwd - - rm -rf BUILD/* - - cp -r DEV/dist/gonets-linux-x64/* BUILD/ - - rm -rf DEV - - # ИНИЦИАЛИЗАЦИЯ DEBIAN КОНФИГУРАЦИЙ ДЛЯ СБОРКИ - - cd .. - - pwd - - cd .. - - pwd - - mv gonets gonets-0.1 - - cd gonets-0.1 - - pwd - - ls - - DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --single -y --createorig - - cd debian/ - - rm -f *.ex - - rm -f README.* - - # КЛОНИРОВАНИЕ НЕОБХОДИМЫХ ШАБЛОНОВ КОНФИГОВ ДЕБИАНА ДЛЯ СБОРКИ - - mkdir -p /woodpecker/src/dev.gossys.dev/s.galanskiy/templates - - git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets-debian-template.git /woodpecker/src/dev.gossys.dev/s.galanskiy/templates - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/changelog /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/control /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/copyright /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/install /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/postinst /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/postrm /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - mv /woodpecker/src/dev.gossys.dev/s.galanskiy/templates/rules /woodpecker/src/dev.gossys.dev/s.galanskiy/gonets-0.1/debian/ - - # СБОРКА ДЕБИАН ПАКЕТА - - cd .. - - pwd - - dpkg-buildpackage -us -uc -b - - # ИЗВЛЕЧЕНИЕ ВЕРСИИ ПАКЕТА ДЛЯ КОММИТА - - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) - - echo "VERSION=$VERSION" > version.env - - # КОММИТ И ТЕГ НА ВЕТКУ DEVELOP - - . ./version.env - - git config user.name "s.galanskiy" - - git config user.email "s.galanskiy@gossys.dev" - - git fetch --all --prune - - git branch -r - - git checkout -b "release/$VERSION" - - git commit -am "Релиз $VERSION" - - git tag -f "v$VERSION" - - git push "https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git" "release/$VERSION" - - git push -f https://s.galanskiy:b4785198d18200dfed812dc4299575f736255bd7@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION" - - # СОЗДАНИЕ И ЗАГРУЗКА РЕЛИЗА ЧЕРЕЗ API - - | - VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version) - echo "VERSION=$VERSION" > version.env - - # Задать переменные - . ./version.env - TAG="v$VERSION" - - DEB_PATH=$(find .. -maxdepth 1 -type f -name "gonets_*_amd64.deb" | head -n 1) - - if [ ! -f "$DEB_PATH" ]; then - echo ".deb файл не найден по пути: $DEB_PATH" - exit 1 - fi - - RELEASE_JSON=$(curl -s -X POST "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases" \ - -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ - -H "Content-Type: application/json" \ - -d "{\"tag_name\": \"$TAG\", \"name\": \"Релиз $TAG\", \"body\": \"Сборка .deb пакета для версии $TAG\", \"draft\": false, \"prerelease\": true}") - - RELEASE_ID=$(echo "$RELEASE_JSON" | grep '"id":' | head -n1 | sed 's/[^0-9]*\([0-9]*\).*/\1/') - - if [ -z "$RELEASE_ID" ]; then - echo "Не удалось получить ID релиза из ответа:" - echo "$RELEASE_JSON" - exit 1 - fi - - curl -s -X POST \ - -H "Authorization: token b4785198d18200dfed812dc4299575f736255bd7" \ - -F "attachment=@$DEB_PATH" \ - "https://dev.gossys.dev/api/v1/repos/s.galanskiy/gonets/releases/$RELEASE_ID/assets" || echo "Ошибка загрузки файла" \ No newline at end of file + - touch file + - git add . + - git commit -m "commit" + - git push https://$forgejo_token@dev.gossys.dev/s.galanskiy/gonets.git \ No newline at end of file From d7656bd2616df7f913908f0bb90737521082fb7b Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 15:20:40 +0500 Subject: [PATCH 16/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index d5db2cd..22a8f18 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -4,7 +4,9 @@ when: steps: checkout: image: debian:latest - secrets: [forgejo_token] + environment: + FORGEJO_TOKEN: + from_secret: forgejo_token commands: # ПОДГОТОВКА ГИТА И КЛОНИРОВАНИЕ GONETS - apt update From 98cfd6da943af9327c27b8ea15cc5c3f0ae588e8 Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 15:21:56 +0500 Subject: [PATCH 17/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 22a8f18..5757eca 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -12,6 +12,8 @@ steps: - apt update - apt install -y git git-lfs - git lfs install + - git config --global user.email "s.galanskiy@gossys.dev" + - git config --global user.name "s.galanskiy" - touch file - git add . - git commit -m "commit" From 0ee3d21d7cf8d0f1ff58a03b55cc13669bbeb62d Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 15:25:38 +0500 Subject: [PATCH 18/19] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20.woodpecker/.woodpecker.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker/.woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.woodpecker.yml b/.woodpecker/.woodpecker.yml index 5757eca..94ea84d 100644 --- a/.woodpecker/.woodpecker.yml +++ b/.woodpecker/.woodpecker.yml @@ -17,4 +17,4 @@ steps: - touch file - git add . - git commit -m "commit" - - git push https://$forgejo_token@dev.gossys.dev/s.galanskiy/gonets.git \ No newline at end of file + - git push https://$FORGEJO_TOKEN@dev.gossys.dev/s.galanskiy/gonets.git \ No newline at end of file From c4546fec60449c12b77b1efb99c321a93b493bcf Mon Sep 17 00:00:00 2001 From: "s.galanskiy" Date: Thu, 3 Jul 2025 11:02:52 +0000 Subject: [PATCH 19/19] commit --- file | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 file diff --git a/file b/file new file mode 100644 index 0000000..e69de29