1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/writefreely_ynh.git synced 2024-09-03 20:36:02 +02:00

Merge pull request #65 from YunoHost-Apps/testing

Testing
This commit is contained in:
yalh76 2019-10-23 00:21:38 +02:00 committed by GitHub
commit 7739f0b506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 25 deletions

View file

@ -13,10 +13,12 @@ Can be run as Single User Blog or Multi User Instance.
Each User can be limited from 1 to unlimited blogs.
**WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
**Shipped version:** v0.10.0
## Important points to read before installing
**WriteFreely** require a dedicated **root domain**, eg. writefreely.domain.tld
## Screenshots
![writefreely-screenshot1](https://user-images.githubusercontent.com/30271971/52228565-fa4ab300-28b2-11e9-8983-3eb8cdbc2262.png)
@ -65,7 +67,6 @@ If User Mode is configured Multiple users, the app be used by multiple users
Developers info
----------------
**Only if you want to use a testing branch for coding, instead of merging directly into master.**
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/writefreely_ynh/tree/testing).
To try the testing branch, please proceed like that.

6
conf/arm.src Normal file
View file

@ -0,0 +1,6 @@
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.10.0/writefreely_0.10.0_linux_arm7.tar.gz
SOURCE_SUM=a746db116272d5ded74cd5556b56ed2f2c4f6af1785f44e6254b63adee0a7d92
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/writeas/writefreely/releases/download/v0.10.0/writefreely_0.10.0_linux_amd64.tar.gz
SOURCE_SUM=6dea841d2f81abd0569915011f183aa818a6f2750da1f953848e05bc49073f3d
SOURCE_SUM=11498cfc579b94326bdae0b61a992ba4ee3a0200a83920043c1d8ea3bdce8380
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=false

View file

@ -1,14 +0,0 @@
#!/bin/bash
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
ynh_die "Unable to detect your achitecture, please open a bug describing \
your hardware and the result of the command \"uname -m\"." 1
fi

View file

@ -8,7 +8,7 @@
source detect_arch
source _common.sh
source detect_arch
source ynh_detect_arch__2
source /usr/share/yunohost/helpers
#=================================================
@ -34,9 +34,10 @@ is_public=$YNH_APP_ARG_IS_PUBLIC
password=$YNH_APP_ARG_PASSWORD
single_user=$YNH_APP_ARG_SINGLE_USER
architecture=$(ynh_detect_arch)
# Bypass package_checker name not compatible with writefreely
if [ "$admin" = "package_checker" ]
then
if [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then
admin="test"
fi
@ -47,10 +48,10 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
ynh_print_info --message="Validating installation parameters..."
# Check machine architecture (in particular, we don't support ARM and 32bit machines)
if [ $architecture == "x86_64" ] || [ $architecture == "arm" ]
# Check machine architecture, we don't support 32bit machines
if [ $architecture = "i386" ]
then
ynh_die --message="Sorry, but this app can only be installed on a x86, 64 bits machine :("
ynh_die --message="Sorry, but this app cannot be installed on a i386 32 bits machine :("
fi
final_path=/var/www/$app

View file

@ -8,7 +8,7 @@
source detect_arch
source _common.sh
source detect_arch
source ynh_detect_arch__2
source ynh_check_app_version_changed
source /usr/share/yunohost/helpers
@ -28,6 +28,8 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
port=$(ynh_app_setting_get --app=$app --key=port)
architecture=$(ynh_detect_arch)
#=================================================
# CHECK VERSION
#=================================================

View file

@ -0,0 +1,25 @@
#!/bin/bash
# Check the architecture
#
# example: architecture=$(ynh_detect_arch)
#
# usage: ynh_detect_arch
#
# Requires YunoHost version 2.2.4 or higher.
ynh_detect_arch(){
local architecture
if [ -n "$(uname -m | grep arm64)" ] || [ -n "$(uname -m | grep aarch64)" ]; then
architecture="arm64"
elif [ -n "$(uname -m | grep 64)" ]; then
architecture="x86-64"
elif [ -n "$(uname -m | grep 86)" ]; then
architecture="i386"
elif [ -n "$(uname -m | grep arm)" ]; then
architecture="arm"
else
architecture="unknown"
fi
echo $architecture
}