Welcome to mirror list, hosted at ThFree Co, Russian Federation.

updateConfig.sh - github.com/nextcloud/nextcloud-config-converter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3efb0da0ad0701af50bb68cdff8015bf8fc71c1d (plain)
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
#!/bin/sh

# verbose and exit on error
set -xe

# import GPG keys
gpg --import /gpg/nextcloud-bot.public.asc
gpg --allow-secret-key-import --import /gpg/nextcloud-bot.asc
gpg --list-keys

currentDir=$(pwd)

if [[ -d /tmp/nextcloud-documentation ]]
then
	rm -rf /tmp/nextcloud-documentation
fi

# fetch documentation repo
git clone git@github.com:nextcloud/documentation.git /tmp/nextcloud-documentation
cd /tmp/nextcloud-documentation

for branch in stable22 stable23 stable24 master
do
	git checkout  $branch
	cd $currentDir

	# download current version of config.sample.php
	curl -o /tmp/config.sample.php https://raw.githubusercontent.com/nextcloud/server/$branch/config/config.sample.php

	# use that to generate the documentation
	php convert.php --input-file=/tmp/config.sample.php --output-file=/tmp/nextcloud-documentation/admin_manual/configuration_server/config_sample_php_parameters.rst

	cd /tmp/nextcloud-documentation
	# invokes an output if something has changed
	status=$(git status -s)

	if [ -n "$status" ]; then
		echo "Push $branch"
		git commit -am 'generate documentation from config.sample.php'
		git push
	fi

	# cleanup
	rm -rf /tmp/config.sample.php
done