gonets/.woodpecker/.woodpecker.yml
s.galanskiy 2adbab5d58
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Обновить .woodpecker/.woodpecker.yml
2025-06-27 15:41:54 +05:00

84 lines
No EOL
3.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

when:
event: [push, tag]
branch: main
steps:
checkout:
image: debian:latest
environment:
GONETS:
from_secret: GONETS
commands:
# ПОДГОТОВКА ГИТА И КЛОНИРОВАНИЕ GONETS
- apt update
- apt install -y git git-lfs
- git lfs install
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git
# УСТАНОВКА НЕОБХОДИМЫХ ЗАВИСИМОСТЕЙ НА СИСТЕМЕ
- apt update
- apt install -y python3 python3-pip python3-poetry nodejs npm debhelper devscripts build-essential fakeroot dh-make dpkg-dev
- python3 --version
- node -v
- npm -v
# ПОДГОТОВКА СПИСКА PYTHON ЗАВИСИМОСТЕЙ GONETS
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="/root/.local/bin:$PATH"
- source ~/.bashrc
- poetry --version
- cd gonets/SRV
- poetry install
- rm -f requirements.txt
- poetry export -f requirements.txt --output requirements.txt --without-hashes
# ПОДГОТОВКА И СБОРКА FRONTEND ЧАСТИ GONETS
- cd gonets/FRONT/DEV
- npm install
- npm run package
- cd dist/gonets-linux-x64/resources/app
- 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 ../../../..
- rm -rf FRONT/BUILD/*
- cp -r dist/gonets-linux-x64/* ../../BUILD/
- cd ../..
- rm -rf DEV
# ИНИЦИАЛИЗАЦИЯ DEBIAN КОНФИГУРАЦИЙ ДЛЯ СБОРКИ
- cd gonets
- DESKTOP=1 DEBEMAIL="devteam@gossys.dev" DEBFULLNAME="GOSSYS LLC" dh_make --single -y
- cd debian/
- rm -f *.ex
- rm -f README.*
# КЛОНИРОВАНИЕ НЕОБХОДИМЫХ ШАБЛОНОВ КОНФИГОВ ДЕБИАНА ДЛЯ СБОРКИ
- git clone https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets-debian-template.git
- mv gonets-debian-template/changelog gonets/debian/
- mv gonets-debian-template/control gonets/debian/
- mv gonets-debian-template/copyright gonets/debian/
- mv gonets-debian-template/install gonets/debian/
- mv gonets-debian-template/postinst gonets/debian/
- mv gonets-debian-template/postrm gonets/debian/
- mv gonets-debian-template/rules gonets/debian/
# СБОРКА ДЕБИАН ПАКЕТА
- cd gonets
- dpkg-buildpackage -us -uc -b
# ИЗВЛЕЧЕНИЕ ВЕРСИИ ПАКЕТА ДЛЯ КОММИТА
- cd gonets
- VERSION=$(dpkg-parsechangelog -l./debian/changelog --show-field Version)
- echo "VERSION=$VERSION" > version.env
# КОММИТ И ТЕГ НА ВЕТКУ DEVELOP
- cd gonets
- source version.env
- git config user.name "s.galanskiy"
- git config user.email "s.galanskiy@gossys.dev"
- git checkout develop
- git commit -am "Релиз $VERSION"
- git tag "v$VERSION"
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git develop
- git push https://s.galanskiy:${GONETS}@dev.gossys.dev/s.galanskiy/gonets.git "v$VERSION"