mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-14 20:33:05 +02:00
snap: set version manually
This commit is contained in:
parent
821e681520
commit
0f645e9b76
@ -1,7 +1,7 @@
|
|||||||
name: qelectrotech
|
name: qelectrotech
|
||||||
title: QElectroTech
|
title: QElectroTech
|
||||||
base: core20
|
base: core20
|
||||||
adopt-info: qelectrotech
|
version: "0.8.0"
|
||||||
license: GPL-2.0
|
license: GPL-2.0
|
||||||
summary: Electrical diagram editor
|
summary: Electrical diagram editor
|
||||||
description: |
|
description: |
|
||||||
@ -12,10 +12,6 @@ grade: stable
|
|||||||
confinement: strict
|
confinement: strict
|
||||||
compression: lzo
|
compression: lzo
|
||||||
|
|
||||||
architectures:
|
|
||||||
- build-on: amd64
|
|
||||||
run-on: amd64
|
|
||||||
|
|
||||||
layout:
|
layout:
|
||||||
/usr/local/share/qelectrotech:
|
/usr/local/share/qelectrotech:
|
||||||
symlink: $SNAP/usr/local/share/qelectrotech
|
symlink: $SNAP/usr/local/share/qelectrotech
|
||||||
@ -96,11 +92,8 @@ parts:
|
|||||||
- git
|
- git
|
||||||
- libsqlite3-dev
|
- libsqlite3-dev
|
||||||
override-build: |
|
override-build: |
|
||||||
displayed_version=$(grep "displayedVersion" sources/qet.h | tr -d "\";" | cut -d" " -f5)
|
modified_displayed_version="${SNAPCRAFT_PROJECT_VERSION}.snap"
|
||||||
snap_version="${displayed_version}-g$(git rev-parse --short=8 HEAD)"
|
|
||||||
modified_displayed_version="${snap_version}.snap"
|
|
||||||
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
sed -i -E "s|const QString displayedVersion =.*|const QString displayedVersion =\"$modified_displayed_version\";|" sources/qet.h
|
||||||
snapcraftctl set-version "$snap_version"
|
|
||||||
qmake "$SNAPCRAFT_PART_SRC/qelectrotech.pro"
|
qmake "$SNAPCRAFT_PART_SRC/qelectrotech.pro"
|
||||||
make -j${SNAPCRAFT_PARALLEL_BUILD_COUNT}
|
make -j${SNAPCRAFT_PARALLEL_BUILD_COUNT}
|
||||||
make install INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL"
|
make install INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user