src/indexOld.js
function setInstanceInfo(machineName, versionKey, instanceKey, info, withCommit, message) {

        let route = getInstanceInfoRoute(machineName, versionKey, instanceKey);
        jsonfile.writeFileSync(repositoryPath + "/" + route, info, {spaces: 2});

        if(withCommit) {
            return _commit(null, [route],
                message || "Changed the info for the " + instanceKey + " of the " +
                versionKey + " of the '" + machineName + "' machine");
        }

    }
function setInstanceInfo(machineName, versionKey, instanceKey, info, withCommit, message) {

        let route = getInstanceInfoRoute(machineName, versionKey, instanceKey);
        jsonfile.writeFileSync(repositoryPath + "/" + route, info, {spaces: 2});

        if(withCommit) {
            return _commit(null, [route],
                message || "Changed the info for the " + instanceKey + " of the " +
                versionKey + " of the '" + machineName + "' machine");
        }

    }
function setInstanceInfo ( machineName , versionKey , instanceKey , info , withCommit , message ) { let route = getInstanceInfoRoute ( machineName , versionKey , instanceKey ) ; jsonfile . writeFileSync ( repositoryPath + "/" + route , info , { spaces : 2 } ) ; if ( withCommit ) { return _commit ( null , [ route ] , message || "Changed the info for the " + instanceKey + " of the " + versionKey + " of the '" + machineName + "' machine" ) ; } }
Update the instance's info.json file using a JavasScript Object
@method setInstanceInfo
@param {String} machineName The name of the machine
@param {String} versionKey The key of the version
@param {String} instanceKey The key of the instance
@param {Object} info The info Object to save
@param {boolean} withCommit If true commits the changes to the repository
@param {String} message If supplied it is used as the message for the commit
@returns {Promise} If withCommit is true, the function returns a Promise
Update the instance s info . json file using a JavasScript Object