-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush_config_to_appcenter
executable file
·56 lines (45 loc) · 2 KB
/
push_config_to_appcenter
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
#!/usr/bin/env bash
# Helper to push the app-dir to the Appcenter
#
# Copyright (C) 2022 Univention GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: AGPL-3.0-or-later
# SPDX-License-Name: GNU Affero General Public License v3.0 or later
# SPDX-License-URL: https://spdx.org/licenses/AGPL-3.0-or-later.html
set -e
set -x
APP_ID="dovecot-connector"
selfservice () {
local uri="https://provider-portal.software-univention.de/appcenter-selfservice/univention-appcenter-control"
local first=$1
shift
# USERNAME="$USER"
# [ -e "$HOME/.univention-appcenter-user" ] && USERNAME="$(< $HOME/.univention-appcenter-user)"
# PWDFILE="~/.selfservicepwd"
# [ -e "$HOME/.univention-appcenter-pwd" ] && PWDFILE="$HOME/.univention-appcenter-pwd"
# curl -sSfL "$uri" | python2 - "$first" --username=${USERNAME} --pwdfile=${PWDFILE} "$@"
curl -sSfL "$uri" | python3 - "$first" "$@"
}
die () {
echo "$@"
exit 0
}
[ "$IGN_GIT" != "true" ] && test -n "$(git status -s)" && die "Changes in repo, do not upload app! (to override: IGN_GIT=true)"
APP_VERSION="$(grep ^Version app/ini | awk '{ print $3 }')"
APP_VERSION_STRING="4.4/${APP_ID}=${APP_VERSION}"
echo "App version in source code is: '${APP_VERSION}'."
echo "The app version string used for the upload is '${APP_VERSION_STRING}'."
selfservice upload "${APP_VERSION_STRING}" app/ini app/listener_trigger app/README_DE app/README_EN app/settings