mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 11:12:15 +02:00
token install script instead; try updating github action to match
This commit is contained in:
parent
631cbfca8c
commit
f83835578c
14
.github/workflows/php.yml
vendored
14
.github/workflows/php.yml
vendored
@ -14,6 +14,9 @@ jobs:
|
||||
php-version: 7.4
|
||||
tools: composer
|
||||
|
||||
- name: run insall.sh
|
||||
run: /bin/bash install.sh
|
||||
|
||||
- name: check composer
|
||||
run: composer validate
|
||||
|
||||
@ -24,9 +27,6 @@ jobs:
|
||||
- name: check formatting
|
||||
run: composer check-format
|
||||
|
||||
- name: setup templates_c
|
||||
run: mkdir templates_c || true
|
||||
|
||||
- name: touch config.local.php
|
||||
run: touch config.local.php
|
||||
|
||||
@ -49,8 +49,8 @@ jobs:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: composer
|
||||
|
||||
- name: setup templates_c
|
||||
run: mkdir templates_c || true
|
||||
- name: run insall.sh
|
||||
run: /bin/bash install.sh
|
||||
|
||||
- name: touch config.local.php
|
||||
run: touch config.local.php && php -v
|
||||
@ -73,8 +73,8 @@ jobs:
|
||||
php-version: '7.4'
|
||||
tools: composer
|
||||
|
||||
- name: setup templates_c
|
||||
run: mkdir templates_c || true
|
||||
- name: run insall.sh
|
||||
run: /bin/bash install.sh
|
||||
|
||||
- name: touch config.local.php
|
||||
run: touch config.local.php && php -v
|
||||
|
45
install.sh
Normal file
45
install.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
|
||||
|
||||
COMPOSER_URL=https://getcomposer.org/download/latest-stable/composer.phar
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Check for $(pwd)/composer.phar
|
||||
|
||||
echo " * Checking for composer.phar "
|
||||
|
||||
if [ ! -f composer.phar ]; then
|
||||
|
||||
echo " * Trying to download composer.phar from $COMPOSER_URL "
|
||||
# try and download it one way or another
|
||||
if [ -x /usr/bin/wget ]; then
|
||||
wget -q -O composer.phar $COMPOSER_URL
|
||||
else
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
curl -o composer.phar $COMPOSER_URL
|
||||
else
|
||||
echo " ** Could not find wget or curl; please download $COMPOSER_URL to pwd" >/dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " * Running composer install --no-dev"
|
||||
|
||||
php composer.phar install --prefer-dist -n --no-dev
|
||||
|
||||
|
||||
if [ ! -d templates_c ]; then
|
||||
|
||||
echo " * Warning: templates_c didn't exist. I have created it, but you might want to change the ownership and reduce permissions"
|
||||
|
||||
# should really fix ownership to be that of the webserver; is there a nice way to discover which ? (www-data ?)
|
||||
mkdir -p templates_c && chmod 777 templates_c
|
||||
fi
|
||||
echo
|
||||
echo "Please continue configuration / setup within your web browser. "
|
||||
echo "See also : https://github.com/postfixadmin/postfixadmin/blob/master/INSTALL.TXT#L58 "
|
||||
echo
|
Loading…
Reference in New Issue
Block a user