From df7f3f641588edbaf67d4eec4317495232384a79 Mon Sep 17 00:00:00 2001 From: Thomas Phillips Date: Tue, 28 Dec 2021 15:35:05 +0530 Subject: [PATCH] create admin rake task changes --- bump-version.rb | 4 ++-- conf/app.src | 4 ++-- scripts/install | 8 +++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bump-version.rb b/bump-version.rb index b2a5c65..c6237db 100755 --- a/bump-version.rb +++ b/bump-version.rb @@ -53,11 +53,11 @@ module Yunohost end end -github = JSON.parse(URI.parse('https://api.github.com/repos/magicstone-dev/acropolis/branches/main').read) +github = JSON.parse(URI.parse('https://api.github.com/repos/tms-phillips/acropolis/branches/bug/issue-97').read) last_commit = github["commit"]["sha"] version = Date.parse(github["commit"]["commit"]["author"]["date"]).to_s.gsub '-', '.' -url = "https://github.com/magicstone-dev/acropolis/archive/#{last_commit}.tar.gz" +url = "https://github.com/tms-phillips/acropolis/archive/#{last_commit}.tar.gz" puts "Downloading last commit at #{url}" release_file = URI.parse(url).read diff --git a/conf/app.src b/conf/app.src index 46af979..d166fda 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tms-phillips/acropolis/archive/a3dcee047d1687e6e4e265f50d51cf02d5125bce.tar.gz -SOURCE_SUM=6bb9c435024a7e313f93aedfeb26405271c87725e219934e3e541ffb46148f08 +SOURCE_URL=https://github.com/tms-phillips/acropolis/archive/6fc5ad893b9c45e3147110c2d33ba8a1cb2c0c2d.tar.gz +SOURCE_SUM=2aa8eb92f0225b3cbceefeeb48ad2f7b8bba9a41f5e650d1947f0933383a7e67 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/scripts/install b/scripts/install index 49743bb..dbf56cc 100644 --- a/scripts/install +++ b/scripts/install @@ -28,6 +28,9 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC +admin=$YNH_APP_ARG_ADMIN +email=$YNH_APP_ARG_EMAIL +password=$YNH_APP_ARG_PASSWORD ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -256,10 +259,13 @@ pushd "$final_path" popd ynh_script_progression --message="Create initial admin user..." +ynh_script_progression --message=$admin +ynh_script_progression --message=$email +ynh_script_progression --message=$password pushd "$final_path" rake_exec="sudo -u $app $ynh_ruby_load_path RAILS_ENV=production bin/rake" - ynh_exec_warn_less $rake_exec admin:create + ynh_exec_warn_less $rake_exec admin:create[$admin, $email, $password] popd #=================================================