added snapcraft.yaml

This commit is contained in:
Andrei Yankovich 2024-01-17 19:29:47 +01:00
parent 2d47dfeac7
commit a604f90cfb
4 changed files with 71 additions and 1 deletions

@ -39,6 +39,16 @@ SET(TARGET_DIR "${CMAKE_SOURCE_DIR}/Distro")
file(MAKE_DIRECTORY ${TARGET_DIR})
# Desctop deploying
# sets qifw variable
set(ApplicationsDir "@HomeDir@")
set(QIFW_PLATFORM linux)
set(INSTALLER_SUFIX ".run")
if (WIN32)
set(QIFW_PLATFORM windows)
set(INSTALLER_SUFIX ".exe")
set(ApplicationsDir "@ApplicationsDir@")
endif()
message(GIT_COMMIT_COUNT = ${GIT_COMMIT_COUNT})
configure_file_in(${CURRENT_PROJECT} "${CMAKE_CURRENT_SOURCE_DIR}/deploy/SecretService.json")

@ -13,13 +13,20 @@
"recursiveDepth": "10",
"deploySystem": false,
"deb": true,
"zip": true,
"qif": true,
"ignoreEnv": [
"@CMAKE_SOURCE_DIR@/Distro"
],
"extraLib": "crypto",
"targetDir": "@CMAKE_SOURCE_DIR@/Distro",
"deployVersion": "@SECRETSERVICE_VERSION@"
"deployVersion": "@SECRETSERVICE_VERSION@",
"publisher": "QuasarApp group",
"releaseDate": "@TODAY@",
"name": "QASecretService",
"debOut": "QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.deb",
"zipOut": "QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.zip",
"qifOut": "QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@@INSTALLER_SUFIX@"
}

@ -0,0 +1,7 @@
#!/bin/bash
function join_by { local IFS="$1"; shift; echo "$*"; }
var=$(join_by , $@)
$SNAP/CQtDeployer.sh $var -bin $var

@ -0,0 +1,46 @@
#
# Copyright (C) 2024-2024 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
name: qasecretservice # you probably want to 'snapcraft register <name>'
version: '@SECRETSERVICE_VERSION@'
summary: Secret service for open-source projects: securely store confidential values on build machines from source. # 79 char long summary
description: |
Secret service for open-source projects that require safely storing a confidential value on a build machine from the source.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
base: core22
icon: snap/gui/icon.png
apps:
qasecretservice:
command: bin/bash $SNAP/QASecretService.sh
plugs: [home]
parts:
qasecretservice:
# See 'snapcraft plugins'
plugin: dump
source: Distro/QASecretService_@SECRETSERVICE_VERSION@_@CMAKE_SYSTEM_NAME@_@CMAKE_SYSTEM_PROCESSOR@.zip
stage-packages:
- bash
after: [ cqt-meta ]
override-stage: |
snapcraftctl stage
chmod 777 -R "$SNAPCRAFT_STAGE"
cqt-meta:
plugin: dump
source: src/service/Deploy/snap/
override-stage: |
snapcraftctl stage
chmod 777 -R "$SNAPCRAFT_STAGE"