Skip to content

Commit

Permalink
Merge pull request #18 from oat-sa/release-0.3.1
Browse files Browse the repository at this point in the history
Release 0.3.1
  • Loading branch information
krampstudio authored Jan 18, 2019
2 parents 0d190ee + f874e86 commit b04a4b5
Show file tree
Hide file tree
Showing 16 changed files with 6,458 additions and 60 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ typings/
# dotenv environment variables file
.env

.nyc_output
8 changes: 8 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@

- fix windows home path
- library update

## [Version 0.3.0](https://github.com/oat-sa/tao-extension-release/releases/tag/0.3.1)

- Add unit and integration tests
- Add Eslint
- Translations are false by default
- `wwwUser` can be defined in the config file

26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This tool automate TAO extension release

## Installation

Please verify installation [prerequisite](#prerequisite). And run :
Please verify installation [prerequisite](#prerequisite). And run :

```sh
npm i -g @oat-sa/tao-extension-release
Expand Down Expand Up @@ -40,6 +40,23 @@ npm link

So the command `taoRelease` will use the sources.

Useful commands :

- `npm test` runs the test suite
- `npm run test:cov` runs the test suite with code coverage
- `npm run test:dev` runs the test suite in watch mode
- `npm run lint` verifies the sources complies with the code style guide


## Configuration

A file named `.tao-extension-release` is created in the user directory.
The following values can be defined in this file :

- `token` : your Github auth token
- `taoRoot` : the path to the root of TAO
- `wwwUser` : the system user used to launch PHP commands (`www-data`)


## System Prerequisite
<a name="prerequisite"></a>
Expand All @@ -65,11 +82,16 @@ You need to have the `git` > `1.7.0` command available in your `PATH`.

You also need the `php` command available in your `PATH`.

#### sudo (linux and OSX)

You also need the `sudo` command available in your `PATH`.


## Known Issues

### `Task foosass not found`

Everything looks ok but you don't know why the `grunt` task is not found. If you have updated `node` or `npm` recently, you can fix this by :
Everything looks ok but you don't know why the `grunt` task is not found. If you have updated `node` or `npm` recently, you can fix this by :

```sh
cd tao/views/build
Expand Down
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ const gitClientFactory = require('./src/git.js');
const github = require('./src/github.js');
const taoInstanceFactory = require('./src/taoInstance.js');

const data = {};
const data = {
wwwUser : 'www-data'
};

//TODO CLI params
const origin = 'origin';
const baseBranch = 'develop';
const releaseBranch = 'master';
const branchPrefix = 'release';
const wwwUser = 'www-data';

var taoInstance;
var gitClient;
Expand Down Expand Up @@ -96,7 +97,7 @@ config.load()
default: data.taoRoot || process.cwd()
}) )
.then( result => {
taoInstance = taoInstanceFactory(path.resolve(result.taoRoot), false, wwwUser);
taoInstance = taoInstanceFactory(path.resolve(result.taoRoot), false, data.wwwUser);
return taoInstance.isRoot();
})
.then( result => {
Expand Down Expand Up @@ -263,10 +264,13 @@ config.load()


// Update translations
.then( () => log.doing('Translations') )
.then( () => log.warn('Update translations during a release only if you know what you are doing') )
.then( () => inquirer.prompt({
type: 'confirm',
name: 'translation',
message: `${data.extension.name} needs updated translations ? `,
default : false
}) )
.then( result => {
if(result.translation){
Expand Down
Loading

0 comments on commit b04a4b5

Please sign in to comment.