From a12d2160d1d6f3100ad62f9f950164e78272490f Mon Sep 17 00:00:00 2001 From: Greg Pazo Date: Wed, 1 Oct 2014 16:32:10 -0400 Subject: [PATCH] issue #24672 instead of removing pre-req check in xtmfg_package, adding a new enterprise upgrade file to handle any databases running enterprise edition --- scripts/release_build.sh | 22 +++++++++++---- scripts/xml/ent_package.xml | 50 +++++++++++++++++++++++++++++++++++ scripts/xml/xtmfg_package.xml | 7 +++++ 3 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 scripts/xml/ent_package.xml diff --git a/scripts/release_build.sh b/scripts/release_build.sh index 133bf951e..5b20e2658 100755 --- a/scripts/release_build.sh +++ b/scripts/release_build.sh @@ -6,8 +6,8 @@ PAT=$3 # Usage: ./scripts/release_build.sh 4 5 0-beta echo "BUILDING RELEASE "$MAJ"."$MIN"."$PAT"" -git fetch XTUPLE -git checkout XTUPLE/$MAJ"_"$MIN"_"x +#git fetch XTUPLE +#git checkout XTUPLE/$MAJ"_"$MIN"_"x rm -rf scripts/output npm run-script build-basic-postbooks-package-sql @@ -16,8 +16,8 @@ npm run-script build-basic-postbooks-demo npm run-script build-basic-quickstart cd ../private-extensions -git fetch XTUPLE -git checkout XTUPLE/$MAJ"_"$MIN"_"x +#git fetch XTUPLE +#git checkout XTUPLE/$MAJ"_"$MIN"_"x npm run-script build-basic-manufacturing-package-sql npm run-script build-basic-manufacturing-empty @@ -79,9 +79,20 @@ cp scripts/output/manufacturing_upgrade.sql scripts/output/manufacturing-install cd scripts/output tar -zcvf manufacturing-install-$MAJ$MIN$PAT.gz manufacturing-install-$MAJ$MIN$PAT/ +#enterprise upgrade +cd ../../ +mkdir scripts/output/enterprise-upgrade-$MAJ$MIN$PAT +cp scripts/xml/ent_package.xml scripts/output/enterprise-upgrade-$MAJ$MIN$PAT/package.xml +cp scripts/output/postbooks_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT +cp scripts/output/inventory_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT +cp scripts/ouput/distribution_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT +cp scripts/output/manufacturing_upgrade.sql scripts/output/enterprise-upgrade-$MAJ$MIN$PAT +cd scripts/output +tar -zcvf enterprise-upgrade-$MAJ$MIN$PAT.gz enterprise-upgrade-$MAJ$MIN$PAT/ + ADMIN=admin PORT=5432 -HOST=xtuple-vagrant +HOST=localhost DB_LIST="postbooks_demo empty quickstart distempty distquickstart mfgempty mfgquickstart mfgdemo"; for DB in $DB_LIST ; do @@ -100,5 +111,6 @@ rm -rf scripts/output/inventory_basic_install.sql rm -rf scripts/output/inventory_upgrade.sql rm -rf scripts/output/manufacturing-install-$MAJ$MIN$PAT/ rm -rf scripts/output/manufacturing-upgrade-$MAJ$MIN$PAT/ +rm -rf scripts/output/enterprise-upgrade-$MAJ$MIN$PAT/ rm -rf scripts/output/manufacturing_basic_install.sql rm -rf scripts/output/manufacturing_upgrade.sql diff --git a/scripts/xml/ent_package.xml b/scripts/xml/ent_package.xml new file mode 100644 index 000000000..e6e60a117 --- /dev/null +++ b/scripts/xml/ent_package.xml @@ -0,0 +1,50 @@ + + + + SELECT fetchMetricText('Application') = 'Standard'; + This package must be applied to a Manufacturing Edition database. + + + + SELECT TRUE FROM pkghead WHERE pkghead_name = 'xtmfg'; + This package must be applied to an xTuple ERP database that already contains the xtmfg package. + + + + SELECT TRUE FROM pkghead WHERE pkghead_name = 'xtmfg' AND (pkghead_version >= '4.4'); + This package must be applied against the 4.4+ version of the xtmfg package. + + + + SELECT fetchMetricText('ServerVersion') > '4.4.'; + This package must be applied to a 4.4+ database. + + + + + SELECT NOT fetchMetricText('ServerVersion') >= '4.7.0Beta2' AND fetchMetricText('ServerVersion') != '4.7.0'; + This package may not be applied to a database newer than 4.7.0Beta. + + + + + SELECT NOT EXISTS(SELECT 1 FROM pg_namespace WHERE nspname = 'xm'); + This package may not be applied to a mobile-enabled database. Please see your system administrator or contact xTuple. + + + +