diff --git a/README.md b/README.md index 4611c55d74..758a3a2181 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # unleash +__Warning: We are in the process of splitting up unleash into multiple packages in this repository, if you want to test the previous package see [previous tag](https://github.com/finn-no/unleash/tree/v1.0.0-alpha.1) __ + [![Build Status](https://travis-ci.org/finn-no/unleash.svg?branch=master)](https://travis-ci.org/finn-no/unleash) [![Code Climate](https://codeclimate.com/github/finn-no/unleash/badges/gpa.svg)](https://codeclimate.com/github/finn-no/unleash) [![Coverage Status](https://coveralls.io/repos/finn-no/unleash/badge.png?branch=master)](https://coveralls.io/r/finn-no/unleash?branch=master) [![Dependency Status](https://david-dm.org/finn-no/unleash.png)](https://david-dm.org/finn-no/unleash) [![devDependency Status](https://david-dm.org/finn-no/unleash/dev-status.png)](https://david-dm.org/finn-no/unleash#info=devD) ![Admin UI](https://cloud.githubusercontent.com/assets/572/5873775/3ddc1a66-a2fa-11e4-923c-0a9569605dad.png) @@ -49,12 +51,12 @@ export TEST_DATABASE_URL=postgres://unleash_user:passord@localhost:5432/unleash_ // Install dependencies npm install -// Run migrations in your local DBs -./node_modules/.bin/db-migrate up -DATABASE_URL=$TEST_DATABASE_URL ./node_modules/.bin/db-migrate up +// Run migrations in your local DBs (via unleash-api) +npm run db-migrate +DATABASE_URL=$TEST_DATABASE_URL npm run db-migrate -// Start server in dev-mode: -npm run dev +// Start server +npm start // Admin dashboard http://localhost:4242 @@ -62,11 +64,8 @@ http://localhost:4242 // Feature API: http://localhost:4242/features -// Execute tests: +// Execute tests in all packages: npm test - -// Run tests with postgres running in docker: -npm run docker-test ``` ### Making a schema change @@ -76,3 +75,13 @@ npm run docker-test 3. Run `db-migrate create your-migration-name` and edit the generated file to have this line: `module.exports = require('../scripts/migration-runner').create('NNN-your-migration-name');` 4. Run `db-migrate up`. 5. Generate LB artifact using `scripts/generate-liquibase-artifact` (TODO: make this internal) + + +### Publishing / Releasing new packages + +Please run `npm run nsp` nad `npm run lint` checks before publishing. + +Run `npm run publish` to start the publishing process. +Lerna is setup with independent versioning so you will be prompted with version per package, and lerna will update all the versions across packages. + +`npm run publish:dry` \ No newline at end of file diff --git a/package.json b/package.json index 055eef2bb2..d36fb6c5f6 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,15 @@ "scripts": { "bootstrap": "lerna bootstrap", "prepublish": "npm run bootstrap", - "_lint": "lerna exec eslint .", - "lint": "echo 'ok for naoo' && exit 0;", + "lint": "lerna exec eslint .", + "pre-commit": "echo 'no lint check' && exit 0;", "test": "lerna --concurrency=1 exec npm run test", "test:ci": "lerna --concurrency=1 exec npm run test:ci", - "secure": "lerna exec nsp check", - "start": "lerna --scope=unleash-server exec npm start" + "nsp": "lerna exec nsp check", + "start": "lerna --scope=unleash-server exec npm start", + "publish": "lerna publish", + "publish:dry": "lerna publish --skip-git --skip-npm", + "db-migrate": "lerna --scope=unleash-api exec npm run db-migrate" }, "dependencies": {}, "devDependencies": { @@ -38,6 +41,6 @@ "pre-commit": "^1.0.2" }, "pre-commit": [ - "lint" + "pre-commit" ] } diff --git a/packages/unleash-docker/README.md b/packages/unleash-docker/README.md new file mode 100644 index 0000000000..5b2ee1d6c2 --- /dev/null +++ b/packages/unleash-docker/README.md @@ -0,0 +1,6 @@ +# unleash-docker + +```bash +$ docker-compose build +$ docker-compose up +``` \ No newline at end of file