mirror of
https://github.com/YunoHost-Apps/acropolis_ynh.git
synced 2024-09-03 18:06:22 +02:00
create admin rake task changes
This commit is contained in:
parent
cf0f373861
commit
df7f3f6415
3 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue