Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install on v2 #58

Merged
merged 47 commits into from Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3d39136
Sync (#11)
nemsia May 7, 2017
e55bcb4
Sync 2 (#12)
nemsia May 7, 2017
66241c7
Resolved merge conflict
nemsia May 8, 2017
4ab87b7
Merge remote-tracking branch 'YunoHost-Apps/master'
nemsia May 8, 2017
dc0d110
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia May 12, 2017
890b3f2
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia May 28, 2017
30c19b5
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia May 28, 2017
8f88641
upgrade from pre-release
nemsia May 28, 2017
698eb6a
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia May 29, 2017
cbbae3d
Update README.md
nemsia May 29, 2017
6acd2c7
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia Jul 1, 2017
ce09f3e
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia Jul 1, 2017
ad476aa
error on ynh_secure_remove
nemsia Jul 1, 2017
061bb38
error on script
nemsia Jul 1, 2017
7b7070f
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia Jul 8, 2017
60ae658
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master' into…
nemsia Jul 12, 2017
d833f59
Add Install Mastodon with YunoHost Link
nemsia Jul 23, 2017
1f948e7
Merge branch 'master' of https://github.com/YunoHost-Apps/mastodon_ynh
nemsia Jul 23, 2017
0307451
Add libicu-dev and libidn11-dev
nemsia Jul 23, 2017
c50b19a
Merge remote-tracking branch 'refs/remotes/origin/master' into upgrad…
nemsia Jul 25, 2017
99991f4
Readme 1.5.0
nemsia Aug 2, 2017
727140d
Manifest 1.5.0
nemsia Aug 2, 2017
093c4a0
Fix error on readme
nemsia Aug 2, 2017
6b3074f
Update README.md
nemsia Aug 2, 2017
c9c543e
Add additional package for arm upgrade
nemsia Aug 9, 2017
4e7c77b
Merge branch 'master' into master
nemsia Aug 9, 2017
f614669
Merge remote-tracking branch 'refs/remotes/YunoHost-Apps/master'
nemsia Aug 9, 2017
b90b246
Merge branch 'master' of https://github.com/nemsia/mastodon_ynh
nemsia Aug 9, 2017
dd74cb6
Update to 1.5.1
nemsia Aug 9, 2017
f224a7d
New method to select pre-release
nemsia Aug 10, 2017
099de16
Remove prepare_for_foreign_keys
nemsia Sep 7, 2017
6d99d51
Upgrade to 1.6.0
nemsia Sep 11, 2017
132ce09
Merge branch 'master' into master
nemsia Sep 11, 2017
a92d2b7
Remove prepare_for_foreign_keys task on upgrade
nemsia Sep 11, 2017
2955707
Merge branch 'master' of https://github.com/nemsia/mastodon_ynh
nemsia Sep 11, 2017
502e755
Upgrade to ruby 2.5.2 for release 2.0
nemsia Oct 11, 2017
e599588
Fix to 2.4.2
nemsia Oct 11, 2017
85918b2
Fix rbenv install error
nemsia Oct 11, 2017
244edb7
Remove duplicated bundle install and yarn install
nemsia Oct 11, 2017
c687c56
Merge branch 'upgrade-from-pre-release'
nemsia Oct 11, 2017
1b737b0
Update install
nemsia Oct 11, 2017
956dfc4
Update upgrade
nemsia Oct 11, 2017
f32a2a0
Update to 2.0.0
nemsia Oct 11, 2017
b19d877
Update to 2.0.0
nemsia Oct 11, 2017
1b9ee91
Merge branch 'master' into master
nemsia Oct 11, 2017
785edef
Fix install v2.0 ruby version
nemsia Oct 25, 2017
4e83743
Fix install on v2
nemsia Oct 25, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# Mastodon for YunoHost

[![Latest Version](https://img.shields.io/badge/version-1.6.0-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases)
[![Latest Version](https://img.shields.io/badge/version-2.0.0-green.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/releases)
[![Status](https://img.shields.io/badge/status-testing-yellow.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh/milestones)
[![Dependencies](https://img.shields.io/badge/dependencies-includes-lightgrey.svg?style=flat)](https://github.com/YunoHost-Apps/mastodon_ynh#dependencies)
[![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/YunoHost-Apps/mastodon_ynh/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Expand Up @@ -9,7 +9,7 @@
"en": "Mastodon is a free, open-source social network.",
"fr": "Mastodon est un réseau social gratuit et open source."
},
"version": "1.6.0",
"version": "2.0.0",
"url": "https://github.com/tootsuite/mastodon",
"license": "AGPL v3.0",
"maintainer": {
Expand Down
9 changes: 5 additions & 4 deletions scripts/install
Expand Up @@ -122,17 +122,17 @@ COMMANDS

# Install ruby-build
sudo su - $app <<RCOMMANDS
/opt/mastodon/.rbenv/bin/rbenv install 2.4.1
/opt/mastodon/.rbenv/versions/2.4.1/bin/ruby -v
/opt/mastodon/.rbenv/bin/rbenv install 2.4.2
/opt/mastodon/.rbenv/versions/2.4.2/bin/ruby -v
RCOMMANDS

# Create symlink for ruby
sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true
sudo ln -s /opt/mastodon/.rbenv/versions/2.4.2/bin/ruby /usr/bin/ruby || true

# Install Mastodon
sudo su - $app <<MCOMMANDS
pushd ~/live
/opt/mastodon/.rbenv/versions/2.4.1/bin/gem install bundler
/opt/mastodon/.rbenv/versions/2.4.2/bin/gem install bundler
bin/bundle install --deployment --without development test
yarn install --production
MCOMMANDS
Expand Down Expand Up @@ -168,6 +168,7 @@ sudo sed -i "s@#SMTP_OPENSSL_VERIFY_MODE=peer@SMTP_OPENSSL_VERIFY_MODE=none@g" "
# Preconfig CSS & JS
sudo su - $app <<CCOMMANDS
pushd ~/live
echo "SAFETY_ASSURED=1">> .env.production
RAILS_ENV=production bin/bundle exec rails db:setup
RAILS_ENV=production bin/bundle exec rails --trace assets:precompile
CCOMMANDS
Expand Down
23 changes: 19 additions & 4 deletions scripts/upgrade
Expand Up @@ -67,13 +67,28 @@ fi
# add additional package for upgrade
ynh_package_install pkg-config libprotobuf-dev protobuf-compiler libicu-dev libidn11-dev postgresql-server-dev-9.4

# Install ruby 2.4.2 for release 2.0
sudo su - $app <<RCOMMANDS
cd $final_path/.rbenv && git pull && cd -
cd $final_path/.rbenv/plugins/ruby-build && git pull && cd -
$final_path/.rbenv/bin/rbenv install 2.4.2 || true
$final_path/.rbenv/versions/2.4.2/bin/ruby -v
RCOMMANDS

# Create symlink for ruby 2.4.2
sudo ln -s $final_path/.rbenv/versions/2.4.2/bin/ruby /usr/bin/ruby || true

# Install Mastodon
sudo su - $app <<MCOMMANDS
pushd ~/live
$final_path/.rbenv/versions/2.4.2/bin/gem install bundler
bin/bundle install --deployment --without development test
yarn install --pure-lockfile
MCOMMANDS

# Apply Mastodon upgrade
sudo su - $app <<COMMANDS
pushd ~/live
bin/bundle install
yarn install --pure-lockfile
# For 1.4.1 -> 1.4.2 migration prepare_for_foreign_keys is needed
RAILS_ENV=production bundle exec rails mastodon:maintenance:prepare_for_foreign_keys
RAILS_ENV=production bundle exec rails assets:clean
RAILS_ENV=production bundle exec rails assets:precompile
RAILS_ENV=production bundle exec rails db:migrate
Expand Down