diff --git a/README.md b/README.md index e28067b..53810cd 100755 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Focalboard is a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view. -**Shipped version:** 7.1.0~ynh1 +**Shipped version:** 7.4.3~ynh1 ## Screenshots diff --git a/README_fr.md b/README_fr.md index eb64974..f863cc3 100755 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Focalboard est un outil de gestion de projet qui aide à définir, organiser, suivre et gérer le travail entre les équipes, à l'aide d'une vue de tableau kanban familière. -**Version incluse :** 7.1.0~ynh1 +**Version incluse :** 7.4.3~ynh1 ## Captures d'écran diff --git a/conf/app.src b/conf/app.src index 49b129e..76ea51f 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v7.1.0/focalboard-server-linux-amd64.tar.gz -SOURCE_SUM=25101fa5e2fbc4a6a9cde1de00dba2dad086bc38c25410b5cddda593db271284 +SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v7.4.3/focalboard-server-linux-amd64.tar.gz +SOURCE_SUM=bca66712f79489891c66a68a90554930193e0cd400916484d33bab1ad2edf921 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/config.json b/conf/config.json index c7d837f..fad0d01 100644 --- a/conf/config.json +++ b/conf/config.json @@ -2,7 +2,7 @@ "serverRoot": "http://127.0.0.1:__PORT__", "port": __PORT__, "dbtype": "postgres", - "dbconfig": "postgres://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable&connect_timeout=10", + "dbconfig": "postgres://__DB_USER__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable&connect_timeout=10", "postgres_dbconfig": "dbname=__APP__ sslmode=disable", "useSSL": false, "webpath": "./pack", @@ -11,5 +11,6 @@ "telemetry": false, "session_expire_time": 2592000, "session_refresh_time": 18000, + "enablePublicSharedBoards": __ENABLE_PUBLIC_BOARDS__, "localOnly": false } diff --git a/config_panel.toml b/config_panel.toml new file mode 100644 index 0000000..3276f53 --- /dev/null +++ b/config_panel.toml @@ -0,0 +1,16 @@ +version = "1.0" + +[main] +name = "Focalboard configuration" +services = ["__APP__"] + + [main.config] + name = "Configuration Options" + + [main.config.enable_public_boards] + ask = "Enable public boards" + type = "boolean" + yes = "true" + no = "false" + help = "Enable publishing boards for public access" + bind = "enablePublicSharedBoards:__FINALPATH__/config.json" diff --git a/manifest.json b/manifest.json index 24d3b8b..159281f 100755 --- a/manifest.json +++ b/manifest.json @@ -6,21 +6,22 @@ "en": "Self-hosted alternative to Trello, Notion, and Asana", "fr": "Alternative auto-hébergée à Trello, Notion et Asana" }, - "version": "7.1.0~ynh1", + "version": "7.4.3~ynh1", "url": "https://www.focalboard.com/", "upstream": { "license": "MIT", "website": "https://www.focalboard.com/", "admindoc": "https://www.focalboard.com/guide/admin/", "userdoc": "https://www.focalboard.com/guide/user/", - "code": "https://github.com/mattermost/focalboard" + "code": "https://github.com/mattermost/focalboard", + "cpe": "cpe:2.3:a:mattermost:focalboard" }, "license": "MIT", "maintainer": { "name": "eric_G" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": false, "services": [ @@ -44,4 +45,4 @@ } ] } -} +} \ No newline at end of file diff --git a/scripts/install b/scripts/install index 9d8ad22..f012038 100755 --- a/scripts/install +++ b/scripts/install @@ -30,6 +30,8 @@ is_public=$YNH_APP_ARG_IS_PUBLIC app=$YNH_APP_INSTANCE_NAME +enable_public_boards="false" + #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= @@ -50,6 +52,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=5 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=enable_public_boards --value=$enable_public_boards #================================================= # STANDARD MODIFICATIONS @@ -83,9 +86,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path" ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_name --db_name=$db_name +ynh_psql_setup_db --db_user=$db_user --db_name=$db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE diff --git a/scripts/restore b/scripts/restore index 50ca3ec..09be040 100755 --- a/scripts/restore +++ b/scripts/restore @@ -41,7 +41,8 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -77,7 +78,7 @@ ynh_script_progression --message="Restoring the data directory..." --weight=1 ynh_restore_file --origin_path="$files_path" --not_mandatory -mkdir -p files_path +mkdir -p $files_path/files chmod 755 "$files_path" chmod -R o-rwx "$files_path" diff --git a/scripts/upgrade b/scripts/upgrade index 32f4f92..1ed2f2d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,9 +20,13 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_user=$db_name +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) port=$(ynh_app_setting_get --app=$app --key=port) files_path=$(ynh_app_setting_get --app=$app --key=files_path) +enable_public_boards=$(ynh_app_setting_get --app=$app --key=enable_public_boards) + #================================================= # CHECK VERSION #================================================= @@ -34,6 +38,11 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +if [ -z "$enable_public_boards" ]; then + enable_public_boards="false" + ynh_app_setting_set --app=$app --key=enable_public_boards --value=$enable_public_boards +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -95,7 +104,7 @@ then ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/config.json" + ynh_setup_source --dest_dir="$final_path" #--keep="config.json" # Copy the admin saved settings from tmp directory to final path cp -a "$tmpdir/config.json" "$final_path/config.json" @@ -115,6 +124,14 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_script_progression --message="Modifying a config file..." + +ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json" +chmod 600 $final_path/config.json + #================================================= # UPGRADE DEPENDENCIES #=================================================