Hacktoberfest / hacktoberfest-2020

Hacktoberfest - App to manage the annual open-source challenge, used for the 2019 & 2020 seasons.

Home Page:https://hacktoberfest.digitalocean.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Linux environment setup for development

johndbritton opened this issue · comments

As a follow on to #400, we should DRY up the scripts folder so that script/setup correctly configures a development environment on Ubuntu/Debian Linux and script/cibuild relies on that same setup code to configure CI.

It would be nice to update the prerequisites as well:

Ensure your os is the latest MacOS

Contributing to this project gets too expensive if I need to buy a Mac 😜

Ubuntu/Debian Linux

It shouldn't be a big issue to support other Linux distributions as well 🤔

I have just set up the project in openSUSE and that is what I needed to do:

  1. Install the Ruby version specified in .ruby-version
  2. Install PostgreSQL (including the development package). Start PostreSQL systemd service and create a PostgreSQL superuser.
  3. gem install bundler dotenv
  4. cp config/dotenv.template .env
  5. Fill the .env file
  6. bundle install
  7. rake db:create db:migrate

Step 2. is not in the script so I assume that this is not needed in MacOS. 🤔
From step 3. everything works independently of the operative system. My proposal would be to mention steps 1 and 2 as requirements to the README (without detailing how to achieve it) and to keep only 3-7 in the script. I personally wouldn't document how to achieve steps 1 and 2 in the script and in the project documentation because it is different depending on the OS and distribution and it is not really part of the project. This makes it easier to maintain and there is extensive documentation how to do this on the internet. It may be a good idea to link other documentation though. Alternatively, steps 3-7 could be part of the set up documentation in the README (not necessarily in a script).

Step 2 would be needed on a fresh macOS install I think, I imagine it was just that most of us already have it installed/running for other things.

Step 2 for a Mac should be handled by Homebrew, just need to add the relevant packages to Brewfile.