--- version: "3" vars: CURRENT_BRANCH: sh: "git rev-parse --abbrev-ref HEAD" shopt: - "globstar" dotenv: - ".env" tasks: credentials: desc: "Generate credentials file" cmds: - "cp --no-clobber config/credentials.yml.enc.ci config/credentials.yml.enc" sources: - "config/credentials.yml.enc.ci" generates: - "config/credentials.yml.enc" env: desc: "Install the .env file" cmds: - "test -f .env || cp .env.example .env" - ": == Environment vars have changed, please review and edit ==" - "diff -auN --color .env.example .env" sources: - ".env.example" generates: - ".env" gems: desc: "Install gems" deps: - "env" - "credentials" cmds: - "{{.HAINISH}} bundle" sources: - "Gemfile" generates: - "Gemfile.lock" clean: desc: "Clean" cmds: - "rm -rf _sites/test-* _deploy/test-* log/*.log tmp/cache tmp/letter_opener tmp/miniprofiler tmp/storage" node-modules: desc: "Install Node modules" cmds: - "{{.HAINISH}} yarn" sources: - "package.json" - "yarn.lock" status: - "test -d node_modules" assets: desc: "Generate assets" deps: - "node-modules" - "gems" cmds: - "git lfs fetch" - "git lfs checkout" - "{{.HAINISH}} RAILS_ENV=production bundle exec rails webpacker:clobber" - "{{.HAINISH}} RAILS_ENV=production bundle exec rails assets:precompile" - "{{.HAINISH}} RAILS_ENV=production bundle exec rails assets:clean" sources: - "package.json" - "yarn.lock" - "app/assets/**/*" - "app/javascript/**/*" generates: - "public/packs/manifest.json" hosts: desc: "Local DNS resolution for hostnames" interactive: true cmds: - "echo -e \"127.0.0.1 panel.{{.SUTTY}} api.{{.SUTTY}} postgresql.{{.SUTTY}}\" | sudo tee -a /etc/hosts" - "echo -e \"::1 panel.{{.SUTTY}} api.{{.SUTTY}} postgresql.{{.SUTTY}}\" | sudo tee -a /etc/hosts" status: - "grep -q \" panel.{{.SUTTY}} \" /etc/hosts"