-
Notifications
You must be signed in to change notification settings - Fork 12
/
entrypoint.sh
executable file
·57 lines (51 loc) · 2.09 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
#
# ---------------------------------------------------------------------
#
# GLPI tools
#
# @copyright 2017-2022 Teclib' and contributors.
# @licence https://www.gnu.org/licenses/gpl-3.0.html
# @link https://github.com/glpi-project/tools
#
# ---------------------------------------------------------------------
#
# LICENSE
#
# This file is part of GLPI tools.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ---------------------------------------------------------------------
#
composer install --no-progress --no-suggest --no-interaction --prefer-dist
# Check that "plugin-release" script is fetched with project dependencies.
# TODO Embed the release script in "ghcr.io/glpi-project/plugin-builder" docker image.
if [ ! -f "vendor/bin/plugin-release" ]
then
echo "Project must have 'glpi-project/tools' in its composer dependencies."
exit 1
fi
# plugin-release requires tags to be fetched.
# TODO Fix this !
git config --global --add safe.directory $(pwd)
git fetch --tags
# --assume-yes Prevent interactions.
# --dont-check Do not check if $PLUGIN_VERSION is a valid name for a version.
# --nogithub Do not create Github release draft.
# --nosign Do not sign package with gpg.
vendor/bin/plugin-release --assume-yes --dont-check --nogithub --nosign --release $PLUGIN_VERSION --verbose
# Defines output variables.
echo "package-basename=$(find dist/ -type f -name '*.tar.bz2' | xargs -n 1 basename)" >> $GITHUB_OUTPUT
echo "package-path=$(find dist/ -type f -name '*.tar.bz2')" >> $GITHUB_OUTPUT