Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #13 from thiagodesouza/master
Browse files Browse the repository at this point in the history
chore(v4): update travis-ci scripts
  • Loading branch information
thrsouza authored Jan 19, 2020
2 parents 7689ab1 + 2206970 commit c59d750
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 23 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cache:
- node_modules

script:
- bash scripts/travis-create-assets.sh
- node scripts/travis-create-assets.js
- yarn lerna:format
- yarn build

Expand All @@ -25,7 +25,8 @@ deploy:
api_key: $GITHUB_TOKEN
skip_cleanup: true
overwrite: true
file: "temp/packages/*"
file_glob: true
file: "temp/*"
on:
tags: true
repo: neutronjs/neutron
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"website"
],
"useWorkspaces": true,
"version": "4.0.0-next.2",
"version": "4.0.0-next.3",
"changelog": {
"repo": "neutronjs/neutron",
"labels": {
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"dependencies": {
"tar-pack": "^3.4.1"
},
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/neutron-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@neutronjs/cli",
"description": "This CLI was developed to help developers create new projects quickly and easily",
"version": "4.0.0-next.2",
"version": "4.0.0-next.3",
"license": "MIT",
"main": "build/cli.js",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/neutron-start-react-native-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neutronjs/start-react-native-template",
"version": "4.0.0-next.2",
"version": "4.0.0-next.3",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
Expand Down
2 changes: 1 addition & 1 deletion packages/neutron-start-react-template/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neutronjs/start-react-template",
"version": "4.0.0-next.2",
"version": "4.0.0-next.3",
"license": "MIT",
"scripts": {
"start": "craco start",
Expand Down
28 changes: 28 additions & 0 deletions scripts/travis-create-assets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* NEUTRON JS - RELEASE ASSETS COMPRESS
*/
const fs = require('fs');
const tarPack = require('tar-pack');

const dirs = {
PACKAGES: `${process.cwd()}/packages`,
TEMP: `${process.cwd()}/temp`,
};

const packages = fs.readdirSync(dirs.PACKAGES);

if (fs.existsSync(dirs.TEMP)) {
console.log('Removing temp dir.')
fs.rmdirSync(dirs.TEMP, { recursive: true });
}

console.log('Creating temp dir.')
fs.mkdirSync(dirs.TEMP)

console.log('Compressing packages: tar.gz')
packages.forEach(package => {
tarPack.pack(`${dirs.PACKAGES}/${package}/`)
.pipe(fs.createWriteStream(`${dirs.TEMP}/${package}.tar.gz`))
});

console.log('Done!')
16 changes: 0 additions & 16 deletions scripts/travis-create-assets.sh

This file was deleted.

2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@neutronjs/website",
"version": "4.0.0-next.2",
"version": "4.0.0-next.3",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand Down

0 comments on commit c59d750

Please sign in to comment.