From 2f723b0b4055d87d27c9072f14e583676d4d3227 Mon Sep 17 00:00:00 2001 From: Thomas Phillips Date: Thu, 30 Dec 2021 00:13:52 +0530 Subject: [PATCH] create initial admin --- bump-version.rb | 6 +++--- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/install | 8 +------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/bump-version.rb b/bump-version.rb index c6237db..37dd75a 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/tms-phillips/acropolis/branches/bug/issue-97').read) +github = JSON.parse(URI.parse('https://api.github.com/repos/magicstone-dev/acropolis/branches/main').read) last_commit = github["commit"]["sha"] version = Date.parse(github["commit"]["commit"]["author"]["date"]).to_s.gsub '-', '.' -url = "https://github.com/tms-phillips/acropolis/archive/#{last_commit}.tar.gz" +url = "https://github.com/magicstone-dev/acropolis/archive/#{last_commit}.tar.gz" puts "Downloading last commit at #{url}" release_file = URI.parse(url).read @@ -69,4 +69,4 @@ Yunohost::AppSrcFile.new().update(url, sum) # Update manifest file Yunohost::ManifestFile.new().update_with_version(version) -puts "Done!" +puts "Done!" \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index 03f0334..d124bc4 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tms-phillips/acropolis/archive/8a8cabc606c04981b8ac5afe84f61cac7d97a952.tar.gz -SOURCE_SUM=2b12854a8d5f6d4e0f5e9753ffa69d0604bd89a7c11809e732c6a75b95a969ee +SOURCE_URL=https://github.com/magicstone-dev/acropolis/archive/2b1c78ae680abcf42aa6a859139009defda61c1c.tar.gz +SOURCE_SUM=552c3564085fbb6acb8a330477bdda5ab43535969651b5076f92e4036499dcbf SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index c6a1277..b224f61 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Dynamic fork of diaspora*'s federated social network", "fr": "Fourche dynamique du réseau social fédéré de diaspora*" }, - "version": "2021.12.29~ynh2", + "version": "2021.12.02~ynh1", "url": "https://github.com/magicstone-dev/acropolis", "upstream": { "license": "free", diff --git a/scripts/install b/scripts/install index e113b9e..d7a1351 100644 --- a/scripts/install +++ b/scripts/install @@ -250,18 +250,12 @@ pushd "$final_path" sudo -u $app $ynh_ruby_load_path bin/bundle install --full-index popd -ynh_script_progression --message="Preparing the database..." +ynh_script_progression --message="Preparing the database and create initial admin user..." pushd "$final_path" rake_exec="sudo -u $app $ynh_ruby_load_path RAILS_ENV=production bin/rake" ynh_exec_warn_less $rake_exec db:migrate ynh_exec_warn_less $rake_exec assets:precompile -popd - -ynh_script_progression --message="Create initial admin user..." - -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[$username, $email, $password]" popd