Skip to content

Commit

Permalink
Update Build configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Dec 24, 2019
1 parent 301345a commit e4e9112
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 8 deletions.
42 changes: 42 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
language: node_js
cache: npm

before_script:
- npm run build
- npm run eslint

after_success:
- chmod +x ./scripts/handle_changes.sh
- source ./scripts/handle_changes.sh
- node ./scripts/prep_docs.js
- chmod +x ./scripts/push_tag_to_master.sh
- if [ "$TRAVIS_BRANCH" = "release" ]; then ./scripts/push_tag_to_master.sh; fi
- chmod +x ./scripts/prepare_next.sh
- if [ "$TRAVIS_BRANCH" != "master" ]; then ./scripts/prepare_next.sh; fi

deploy:
- provider: npm
edge: true
email: $EMAIL_ADDRESS
api_token: $NPM_TOKEN
on:
repo: $TRAVIS_REPO_SLUG
branch: master
- provider: npm
edge: true
email: $EMAIL_ADDRESS
api_token: $NPM_TOKEN
tag: "next"
on:
all_branches: true
condition: $TRAVIS_BRANCH = "next"
repo: $TRAVIS_REPO_SLUG
- provider: npm
edge: true
email: $EMAIL_ADDRESS
api_token: $NPM_TOKEN
tag: "DEVELOPMENT"
on:
all_branches: true
condition: $TRAVIS_BRANCH != "next" && $TRAVIS_BRANCH != "master" && $TRAVIS_BRANCH != "release"
repo: $TRAVIS_REPO_SLUG
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [Documentation homepage](https://ealush.github.io/vest)
- **Try vest live**
- [Vanilla JS example](https://stackblitz.com/edit/vest-vanilla-support-example)
- [ReactJS example](https://stackblitz.com/edit/vest-react-support-example)
- ReactJS Examples: [1](https://stackblitz.com/edit/vest-react-support-example), [2](https://stackblitz.com/edit/vest-react-registration)

## What is Vest?
Vest is a validations library for JS apps that derives its syntax from modern JS frameworks such as Mocha or Jest. It is easy to learn due to its use of already common declarative patterns.
Expand Down
4 changes: 2 additions & 2 deletions dist/vest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vest.min.js

Large diffs are not rendered by default.

Binary file modified docs/_assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vest",
"version": "1.0.0",
"version": "1.0.2",
"description": "Validation Test",
"main": "./dist/vest.min.js",
"author": "ealush",
Expand Down
4 changes: 2 additions & 2 deletions scripts/determine_change_level.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const { MAJOR_KEYWORD, MINOR_KEYWORD, PATCH_KEYWORD } = require('./constants');
* @return {String} change level
*/
const determineChangeLevel = (message) => {
if (message.toLowerCase().includes(`[${MAJOR_KEYWORD}]`)) {
if (message.toLowerCase().includes(`${MAJOR_KEYWORD}:`)) {
return MAJOR_KEYWORD;
}

if (message.toLowerCase().includes(`[${MINOR_KEYWORD}]`)) {
if (message.toLowerCase().includes(`${MINOR_KEYWORD}:`)) {
return MINOR_KEYWORD;
}

Expand Down
1 change: 0 additions & 1 deletion scripts/get_next_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ const { version } = require('../package.json');
const determineLevel = require('./determine_change_level');

const changeLevel = determineLevel(process.argv[2] || '');

const nextVersion = semver.inc(version, changeLevel);

console.log(nextVersion); // eslint-disable-line
5 changes: 5 additions & 0 deletions scripts/push_tag_to_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ git push origin $NEXT_VERSION

echo "Publishing Release"
node ./scripts/create_release.js "$CHANGELOG"

echo "Trying to update next branch"
git checkout next
git rebase master || git rebase --abort
git push https://${GITHUB_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git next
5 changes: 5 additions & 0 deletions scripts/update_changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ const groupMessages = (gitLog) => gitLog.split('\n').reduce((accumulator, curren
const updateChangelog = () => {
const groupedMessages = groupMessages(gitLog);

if (!Object.keys(groupedMessages).length) {
console.log('');
return;
}

const changelogTitle = `## [${version}] - ${format(new Date(), 'yyyy-MM-dd')}\n`;

const versionLog = [
Expand Down

0 comments on commit e4e9112

Please sign in to comment.