"use strict";
var grunt = require('grunt');
require('load-grunt-tasks')(grunt);

var branch=process.env.sourcebranch;
var folder=grunt.option('folder')||branch||'.';
var solutionjsonfiles = [`${folder}/**/*.json`,`!${folder}/node_modules/**/*.json`];
var createUIDefinition=`${folder}/createUIDefinition.json`;

grunt.initConfig({
    fileExists: {
            scripts: [`${folder}/mainTemplate.json`]
    },
    uidef: grunt.file.readJSON(createUIDefinition),
    jsonlint: {
        all: {
            src: solutionjsonfiles
        }
    },
    tv4: {
        options: {
            root: 'https://schema.management.azure.com/schemas/<%=uidef.version %>/CreateUIDefinition.MultiVm.json',
            multi: true,
            banUnknownProperties: true
        },
        myTarget: {
            src: [createUIDefinition]
        }
    }
});

grunt.task.registerTask("test", ["fileExists","jsonlint","tv4"]);

"use strict";
var grunt = require('grunt');
require('load-grunt-tasks')(grunt);

var branch=process.env.sourcebranch;
var folder=grunt.option('folder')||branch||'.';
var solutionjsonfiles = [`${folder}/**/*.json`,`!${folder}/node_modules/**/*.json`];
var createUiDefinition=`${folder}/createUiDefinition.json`;

grunt.initConfig({
    fileExists: {
            scripts: [`${folder}/mainTemplate.json`]
    },
    uidef: grunt.file.readJSON(createUiDefinition),
    jsonlint: {
        all: {
            src: solutionjsonfiles
        }
    },
    tv4: {
        options: {
            root: 'https://schema.management.azure.com/schemas/<%=uidef.version %>/CreateUIDefinition.MultiVm.json',
            multi: true,
            banUnknownProperties: true
        },
        myTarget: {
            src: [createUiDefinition]
        }
    }
});

grunt.task.registerTask("test", ["fileExists","jsonlint","tv4"]);

Use correct filename for createUiDefinition.json
Use correct filename for createUiDefinition.json

Azure expects the filename to be camel case for
`createUiDefinition.json` and will fail to accept a zipfile containing
with any different filename. This fixes the Gruntfile to look for the
correct filename and generate everything correctly.

Signed-off-by: Ryan Hass <7a1efea0847aa10fda44596a4a622bd3187d968e@users.noreply.github.com>
