Skip to content
This repository was archived by the owner on Dec 17, 2019. It is now read-only.

Build Command Reference

bcm edited this page Oct 14, 2014 · 2 revisions

TODO: Describe how the config file specifies which commands are available and how config affects execution of subcommands.

Platform dependencies

An application requires the underlying platform to provide a number of software packages. The shred platform_deps command has subcommands for installing and updating these dependencies. It uses the platform's package manager to locate the dependencies in the package manager's repository and to manage the installation process.

Install platform dependencies with shred platform_deps install.

Update platform dependencies with shred platform_deps update.

N.B. Only supports OSX at the moment.

Platform service management

Some of the software packages provided by the platform are services that must be explicitly started before the application (and optionally stopped when the application is no longer running). The shred services command has subcommands for starting and stopping these services.

Start platform services with shred services start.

Stop platform services with shred services stop.

N.B. Only supports OSX at the moment.

Ruby dependencies

The shred ruby_deps command has subcommands for installing third-party Ruby libraries. It uses the Bundler package manager. Dependencies are specified in Gemfile.

Install Ruby dependencies with shred ruby_deps install.

JavaScript dependencies

The shred js_deps command has subcommands for installing third-party JavaScript libraries. It uses Bower via bower-rails. Dependencies are specified in Bowerfile.

Install JS dependencies with shred js_deps install.

Database

The shred db command has subcommands for initializing a database and applying migrations to it via Rails-provided Rake tasks.

If your database has never been set up before, initialize it with shred db init.

If you have unapplied migrations, apply them with shred db migrate.

Environment-specific configuration

Configuration items specific to the host environment are configured in the .env file in the project directory. This file is meant to be read when the app server starts up and its contents made available to the server process as environment variables as per http://12factor.net/config.

Use shred dotenv heroku to generate your .env by copying config items from a Heroku application. If you have never logged into Heroku from the command line before this command will ask for your Heroku account's email address and password.

Tests

The shred test command has subcommands for running tests. Any command line can be specified for server tests and for client tests.

Run all tests (server and client) with shred test all.

Run only server tests with shred test server.

Run only client tests with shred test client.

App server startup

The shred app command has subcommands for managing the application server process. While it is assumed that Foreman will be used, any command line can be specified.

Start the app server in the foreground with shred app start.

Use normal shell tools (eg Ctrl-C) to suspend, background, foreground and exit the server.