|
@@ -0,0 +1,47 @@
|
|
|
|
+var shared = require("softwareManager/TriggerFcns");
|
|
|
|
+var console = require("console");
|
|
|
|
+var LABKEY = require("labkey");
|
|
|
|
+//importClass(Packages.java.io.File);
|
|
|
|
+//var fs = require ("fs");
|
|
|
|
+
|
|
|
|
+//how routines implemented from java look in javascript:
|
|
|
|
+//https://docs.nativescript.org/runtimes/android/marshalling/java-to-js
|
|
|
|
+function init(event, errors) {
|
|
|
|
+ console.log("init() called in orgs.js with an event type of " + event);
|
|
|
|
+ //console.log("Function in shared TriggerFcns.js script returns :" + shared.sampleFunc('echo'));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function complete(event, errors) {
|
|
|
|
+ console.log("complete() called in orgs.js with an event type of " + event);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function afterInsert(row, errors){
|
|
|
|
+ console.log("afterInsert() called in orgs.js with a row object of " + row);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function beforeUpdate(row, oldRow, errors){
|
|
|
|
+ console.log("softwareManager::beforeUpdate() called in orgs.js with a row object of " + row + " and an oldRow of " + oldRow);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function beforeDelete(row, errors){
|
|
|
|
+ console.log("beforeDelete() called in orgs.js with a row object of " + row);
|
|
|
|
+}
|
|
|
|
+function beforeInsert(row, errors){
|
|
|
|
+ console.log("beforeInsert() called in orgs.js with a row object of " + row);
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+function afterUpdate(row, oldRow, errors){
|
|
|
|
+ console.log("afterUpdate() called in orgs.js with a row object of " + row + " and an oldRow of " + oldRow);
|
|
|
|
+ let scriptArg={};
|
|
|
|
+ scriptArg.softwarePackage=row['softwarePackage'];
|
|
|
|
+ scriptArg.source=row['source'];
|
|
|
|
+ scriptArg.branch=row['branch'];
|
|
|
|
+ shared.gitPull(scriptArg);
|
|
|
|
+ console.log('gitPull reports: '+scriptArg.output);
|
|
|
|
+}
|
|
|
|
+function afterDelete(row, errors){
|
|
|
|
+ console.log("afterDelete() called in orgs.js with a row object of " + row);
|
|
|
|
+}
|