From 779af75085de154791b8dc859aedb4265dbe1347 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Jun 2016 12:14:01 -0400 Subject: [PATCH 1/6] testing front end runner scripts --- frontrunners/apex-to-file.sh | 3 +++ package.json | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 frontrunners/apex-to-file.sh diff --git a/frontrunners/apex-to-file.sh b/frontrunners/apex-to-file.sh new file mode 100644 index 0000000..894b357 --- /dev/null +++ b/frontrunners/apex-to-file.sh @@ -0,0 +1,3 @@ +# to be called from top level dir of project +node_modules/apex-source-control/scripts/check_conf_file.sh +node_modules/apex-source-control/scripts/apexupdate.sh diff --git a/package.json b/package.json index 0bea582..876f0be 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,13 @@ "apex-update" : "scripts/apexupdate.sh", "check-conf-file" : "scripts/check_conf_file.sh", "new-conf-file" : "scripts/make-new-config-file.sh", - "switch-conf-file" : "scripts/switch-config-file.sh" + "switch-conf-file" : "scripts/switch-config-file.sh", + "apex-to-file" : "frontrunners/apex-to-file.sh" }, "scripts": { "test": "echo teammates all left before they had to buy a round", "env" : "env", - "apex-to-file" : "check-conf-file && apex-update", + "apex-to-file" : "apex-to-file", "file-to-apex" : "check-conf-file && source config/apexupdate.conf && cd non-apex/install && sqlplus $username/$password@$database_connection @install_apex.sql $apexappid $workspace_name $parsing_schema", "new-conf-file" : "new-conf-file", "switch-conf-file" : "switch-conf-file", From c81325f573beff180fe366d1abfb1741cab7ee11 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Jun 2016 13:21:40 -0400 Subject: [PATCH 2/6] added the rest of the frontrunners and updated package.json --- frontrunners/file-to-apex.sh | 5 +++++ frontrunners/generate-app-id.sh | 4 ++++ frontrunners/read-conf-file.sh | 18 ++++++++++++++++++ package.json | 13 +++++++------ 4 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 frontrunners/file-to-apex.sh create mode 100644 frontrunners/generate-app-id.sh create mode 100644 frontrunners/read-conf-file.sh diff --git a/frontrunners/file-to-apex.sh b/frontrunners/file-to-apex.sh new file mode 100644 index 0000000..dd9cedf --- /dev/null +++ b/frontrunners/file-to-apex.sh @@ -0,0 +1,5 @@ +# designed to be called from top level project dir +node_modules/apex-source-control/scripts/check_conf_file.sh +source config/apexupdate.conf +cd apex/ +sqlplus $username/$password@$database_connection @../node_modules/apex-source-control/scripts/install_apex.sql $apexappid $workspace_name $parsing_schema diff --git a/frontrunners/generate-app-id.sh b/frontrunners/generate-app-id.sh new file mode 100644 index 0000000..8f30177 --- /dev/null +++ b/frontrunners/generate-app-id.sh @@ -0,0 +1,4 @@ +# designed to be called from top level project dir +node_modules/apex-source-control/scripts/check_conf_file.sh +source config/apexupdate.conf +sqlplus $username/$password@$database_connection @node_modules/apex-source-control/scripts/generate_new_app_id.sql diff --git a/frontrunners/read-conf-file.sh b/frontrunners/read-conf-file.sh new file mode 100644 index 0000000..d65a52e --- /dev/null +++ b/frontrunners/read-conf-file.sh @@ -0,0 +1,18 @@ +# designed to be called from to level project dir + +if [ ! -h ./config/apexupdate.conf ]; then + echo "Missing symbolic link: $PWD/config/apexupdate.conf" + echo "Please use the command 'npm run switch-conf-file' to create the symbolic link ./config/apexupdate.conf to your config file" + echo "If you don't have a config file set up you can create one using 'npm run new-config-file'" + exit 1 +fi + +echo "The config file currently being used is: " +readlink ./config/apexupdate.conf + +echo + +echo "The config file looks like this: " +cat ./config/apexupdate.conf + +echo "If any of the data looks wrong you can simply edit the file yourself at ./config/$(readlink ./config/apexupdate.conf)" diff --git a/package.json b/package.json index 876f0be..d9def8e 100644 --- a/package.json +++ b/package.json @@ -4,21 +4,22 @@ "description": "Scripts for bringing Oracle Application Express apps into source control", "main": "index.js", "bin" : { - "apex-update" : "scripts/apexupdate.sh", - "check-conf-file" : "scripts/check_conf_file.sh", "new-conf-file" : "scripts/make-new-config-file.sh", "switch-conf-file" : "scripts/switch-config-file.sh", - "apex-to-file" : "frontrunners/apex-to-file.sh" + "apex-to-file" : "frontrunners/apex-to-file.sh", + "file-to-apex" : "frontrunners/file-to-apex.sh", + "read-conf-file" : "frontrunners/read-conf-file.sh", + "generate-app-id" : "frontrunners/generate-app-id.sh" }, "scripts": { "test": "echo teammates all left before they had to buy a round", "env" : "env", "apex-to-file" : "apex-to-file", - "file-to-apex" : "check-conf-file && source config/apexupdate.conf && cd non-apex/install && sqlplus $username/$password@$database_connection @install_apex.sql $apexappid $workspace_name $parsing_schema", + "file-to-apex" : "file-to-apex", "new-conf-file" : "new-conf-file", "switch-conf-file" : "switch-conf-file", - "which-conf-file" : "readlink ./config/apexupdate.conf", - "generate-new-app-id" : "check-conf-file && cd non-apex/install && sqlplus $username/$password@$database_connection @generate_new_app_id.sql" + "read-conf-file" : "read-conf-file", + "generate-new-app-id" : "generate-app-id" }, "repository": { "type": "git", From 54c5ee8b74845680d04e6f47eba6061b6f354dcb Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Jun 2016 13:30:48 -0400 Subject: [PATCH 3/6] generate new app id fixed output error --- scripts/generate_new_app_id.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/generate_new_app_id.sql b/scripts/generate_new_app_id.sql index 197f0d8..bf1db32 100644 --- a/scripts/generate_new_app_id.sql +++ b/scripts/generate_new_app_id.sql @@ -3,7 +3,6 @@ set serveroutput on set feedback off begin apex_application_install.generate_application_id; - dbms_output.put_Line("Your new apex app id is..."); --This line should be commented out if you want to use spooling dbms_output.put_Line(apex_application_install.get_application_id); end; / From b607caa4662c32c61633f97bbf9aaabb9a49ce70 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Jun 2016 13:35:26 -0400 Subject: [PATCH 4/6] uninstall_apex frontrunner added --- frontrunners/uninstall-apex.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 frontrunners/uninstall-apex.sh diff --git a/frontrunners/uninstall-apex.sh b/frontrunners/uninstall-apex.sh new file mode 100644 index 0000000..b4745b4 --- /dev/null +++ b/frontrunners/uninstall-apex.sh @@ -0,0 +1,4 @@ +# designed to be called from top level project dir +node_modules/apex-source-control/scripts/check_conf_file.sh +source config/apexupdate.conf +sqlplus $username/$password@$database_connection @../node_modules/apex-source-control/scripts/uninstall_apex.sql $apexappid $workspace_name $parsing_schema From 2dce6eafe493d16f59bb0266872bc4a21efc2b13 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Jun 2016 13:38:47 -0400 Subject: [PATCH 5/6] package.json added uninstall frontrunner and script --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d9def8e..8d106b3 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "apex-to-file" : "frontrunners/apex-to-file.sh", "file-to-apex" : "frontrunners/file-to-apex.sh", "read-conf-file" : "frontrunners/read-conf-file.sh", - "generate-app-id" : "frontrunners/generate-app-id.sh" + "generate-app-id" : "frontrunners/generate-app-id.sh", + "uninstall-apex" : "frontrunners/uninstall-apex.sh" }, "scripts": { "test": "echo teammates all left before they had to buy a round", @@ -19,7 +20,8 @@ "new-conf-file" : "new-conf-file", "switch-conf-file" : "switch-conf-file", "read-conf-file" : "read-conf-file", - "generate-new-app-id" : "generate-app-id" + "generate-new-app-id" : "generate-app-id", + "uninstall-apex" : "uninstall-apex" }, "repository": { "type": "git", From a44f6d2356dcba08c8fd3a351a2595cae5295a71 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 1 Jun 2016 13:42:54 -0400 Subject: [PATCH 6/6] uninstall-apex frontrunner script fixed --- frontrunners/uninstall-apex.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontrunners/uninstall-apex.sh b/frontrunners/uninstall-apex.sh index b4745b4..301d76b 100644 --- a/frontrunners/uninstall-apex.sh +++ b/frontrunners/uninstall-apex.sh @@ -1,4 +1,4 @@ # designed to be called from top level project dir node_modules/apex-source-control/scripts/check_conf_file.sh source config/apexupdate.conf -sqlplus $username/$password@$database_connection @../node_modules/apex-source-control/scripts/uninstall_apex.sql $apexappid $workspace_name $parsing_schema +sqlplus $username/$password@$database_connection @node_modules/apex-source-control/scripts/uninstall_apex.sql $apexappid $workspace_name $parsing_schema