Skip to content
This repository was archived by the owner on Apr 26, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
env:
node: true
es6: true
mocha: true

rules:
strict: 2
no-var: 2
no-console: 0
indent: ["error", 2, { "SwitchCase": 1}]

extends: eslint:recommended
2 changes: 2 additions & 0 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[commit]
template = .gittemplate
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ projects/*
**/projects/*

.vscode
.idea
20 changes: 20 additions & 0 deletions .gittemplate
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Type(<scope>): <subject>
# <body>
# <footer>

# Type should be one of the following:
# * BREAKING CHANGES (breaking change) [major release -- 1.x.x]
# * feat (new feature) [minor release -- x.1.x]
# * fix (bug fix) [patch release -- 0.0.x]
# * docs (changes to documentation)
# * style (formatting, missing semi colons, etc; no code change)
# * refactor (refactoring production code)
# * test (adding missing tests, refactoring tests; no production code change)
# * chore (updating grunt tasks etc; no production code change)
# Scope is just the scope of the change. Something like (admin) or (teacher).
# Subject should use clear words and say what you did.
# The body should go into detail about changes made.
# The footer should contain any Github (or other tool) issue references or actions.

# For a full example of how to write a good commit message, check out
# https://conventionalcommits.org/
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ jdk:
before_install:
- nvm install 6.9.1
- cd ./generator-spring
- npm i -g makeshift && makeshift -r https://npm-registry.whitewater.ibm.com -s arf ibm wicked
- npm i -g makeshift && makeshift -r https://registry.npmjs.org
install:
- npm install
script:
- npm run lint
- npm test
- npm run testint
- npm run coverage
- npm run coverageint
- npm run coveralls
- ../deploy.sh
env:
- secure : "jCUer3jHOHsVc8CbFsQfwIsU4sjP0ZiYfpd1KlbM1nGJflF5jlFAJFsPhw9BsKa+g2kZXGUDcjJWWcfQybKu1JwYx0JvQpDpV2npT6E35P8i2WnIZb857BVfz0wBnt2JpBqaZMTxM8gzy33YOkRvTVjkYcZlkx5DrvOgmyLRjQJMZ5nIWRontpuP87x00Z5nY0jJAGBHvPxXB2vNhCdhMgjsIo4NHWaFFuiwwqj0cpy+wP4P7NO+U1mSLaCHg2o6RkAbyfKu1SyU+umdJ4b9e85gYoQp8fJ7k/cY/4slocIMIQD+uNCesRZeHgUlTC2X8tG+UKnfSIQh09mUTsAlF8t9+WHHo4zFIPhZ4VM+aoliLD7dvkFYl9NeWkBfxZbILb3ICC4lLZGXe+rRKYZyhmipAS6zyTC+2vwFckNynGk4N84JwO7a6fJGfUa0bTNVpZeR1KMUaTk/or/Mqz7vfHtWh/291T092NVu7L22UgIrwv9GVzKopbkRKxNx0uoZeFLmsJAfZ3bREpq6688+86oC5xjmQUdku52h9k5LeBe9oa7rC2o0NM6OW0pTxHx0qcJxT7R8W6qyt1rWKIBSncdFsG4wVX8kvTXKtyV6TDXbZ0jQDcHzK4jRowWnU8rlyNnT4iFPV3DhaaUZOo5U2H9EIUllrysrg0etZrq+NHM="

22 changes: 3 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
# Yeoman generator for Spring code
| Build | Status |
| ------ | ---- |
| development | [![Build Status](https://travis.ibm.com/arf/java-codegen-spring.svg?token=D9H1S9JmREZirtqjnxut&branch=development)](https://travis.ibm.com/arf/java-codegen-spring) |
| master | [![Build Status](https://travis.ibm.com/arf/java-codegen-spring.svg?token=D9H1S9JmREZirtqjnxut&branch=master)](https://travis.ibm.com/arf/java-codegen-spring) |

You can see builds for all branches here https://travis.ibm.com/arf/java-codegen-spring/branches.
[![Build Status](https://travis-ci.org/ibm-developer/generator-ibm-java-spring.svg?branch=master)](https://travis-ci.org/ibm-developer/generator-ibm-java-spring)

This is a yeoman generator that will create Java code for you.

* It is published as a node module in the IBM NPM repository : https://npm.whitewater.ibm.com
* The node module is published as @arf/generator-spring (note that it's [scoped](https://docs.npmjs.com/misc/scope#installing-scoped-packages) to @arf), see the [step above](https://github.ibm.com/Whitewater/npm) as to
why this module is scoped.

The code coverage for the latest version of the generator hosted in the [IBM NPM repository](https://npm.whitewater.ibm.com/package/@arf/generator-spring) can be viewed in GitHub Pages. There are separate reports for [unit test coverage](https://pages.github.ibm.com/arf/java-codegen-spring/cc/unit/lcov-report/index.html) and [integration test coverage](https://pages.github.ibm.com/arf/java-codegen-spring/cc/int/lcov-report/index.html).

## Branches
The generator has a number of branches that correspond to various bluemix environments and development lifecycles

* **development** : this is the development branch, although this should build, it is the latest code for this generator and may not work as expected. This branch is needed to be able to do end-to-end testing as YaaS, scaffolder etc. work from git repositories.
* **master** : this is what is deployed into live.
It is published on npm [here](https://www.npmjs.com/package/generator-ibm-java-spring).

## Overview
The generator works by taking the answers that the user has supplied, either via the CLI or a UI, and then maps that
Expand All @@ -27,12 +13,10 @@ It then walks all the files in the directory and for each one parses it through

## Running the generator

This is a sub generator and is intended to work with the main [Java code generator](https://github.ibm.com/arf/java-codegen-yeoman). This generator is listed as a dependency in the [package.json](https://github.ibm.com/arf/java-codegen-yeoman/blob/development/generator-java/package.json) which means that it will be installed automatically. Follow the build instructions for the main page then additionally
This is a sub generator and is intended to work with the main [Java code generator](https://github.com/ibm-developer/generator-ibm-java). This generator is listed as a dependency in the [package.json](https://github.ibm.com/arf/java-codegen-yeoman/blob/development/generator-java/package.json) which means that it will be installed automatically. Follow the build instructions for the main page then additionally

* Fork or clone this repository locally.
* Change into the `generator-spring` directory (where the *package.json* file is)
* Run `npm link` - this will configure your local node installation to resolve this generator from the local file system rather than the NPM registry.

You will now be able to make changes locally and have them picked up when you run the main Java generator.

Further information is available in the [Java Codegen documentation](https://pages.github.ibm.com/arf/java-codegen-devguide/spring/overview/)
7 changes: 7 additions & 0 deletions config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
CMD=$(cat .git/config | grep "commit")
if [ -z $CMD ]; then
echo "$(cat .git/config)\n$(cat .gitconfig)" > ./.git/config
else
echo "commit file template already saved”
fi
15 changes: 0 additions & 15 deletions coverage.sh

This file was deleted.

16 changes: 11 additions & 5 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@ echo "Auto publish script : version 0.0.2"
echo "Checking if a new publish cycle is required ..."
PKG_NAME=`node -e "console.log(require('./package.json').name);"`
PKG_VER=`node -e "console.log(require('./package.json').version);"`
NPM_VER=`npm show $PKG_NAME version`
NPM_VER=`npm show $PKG_NAME version --silent`
CHECK_REG=$(curl https://registry.npmjs.org/$PKG_NAME)
NOT_FOUND=$(node -e "console.log(Object.keys(JSON.parse(JSON.stringify($CHECK_REG))).length)")

echo "$PKG_NAME : version = $PKG_VER, npm version = $NPM_VER"
if [[ $TRAVIS_BRANCH == "master" ]]; then
if [[ $TRAVIS_BRANCH == "master" ]]; then
echo "Build targetting master - checking if this is a PR or not"
if [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
echo "This is a build on master, performing additional steps"
if [[ $PKG_VER == $NPM_VER ]]; then
if [ $NOT_FOUND == 0 ]; then
echo "$PKG_NAME is not in public registry so going to publish"
npm publish
elif [[ $PKG_VER == $NPM_VER ]]; then
echo "Version numbers match, so changing version and committing changes"
npm run prerelease
if [ $? == 0 ]; then
Expand All @@ -24,7 +30,7 @@ if [[ $TRAVIS_BRANCH == "master" ]]; then
fi
else
echo "Version numbers don't match, so publishing to the registry"
npm publish --scope=arf
npm publish
fi
fi
fi
fi
1 change: 0 additions & 1 deletion docs/cc/int/coverage.json

This file was deleted.

213 changes: 0 additions & 213 deletions docs/cc/int/lcov-report/base.css

This file was deleted.

Loading