diff --git a/.github/helper/install.sh b/.github/helper/install.sh index 83bab4e90..97486a860 100644 --- a/.github/helper/install.sh +++ b/.github/helper/install.sh @@ -59,6 +59,10 @@ sed -i 's/socketio:/# socketio:/g' Procfile sed -i 's/redis_socketio:/# redis_socketio:/g' Procfile bench get-app erpnext --branch "$BRANCH_TO_CLONE" --resolve-deps +bench --site test_site restore 20240822_151612-patch_test_localhost-database.sql.gz + +bench remove-app india_compliance --force + bench get-app india_compliance "${GITHUB_WORKSPACE}" bench setup requirements --dev diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index bc891a53c..be1b797ea 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -1,6 +1,13 @@ name: Patch on: + # pull_request: + # paths-ignore: + # - '**.js' + # - '**.css' + # - '**.md' + # - '**.html' + # - '**.csv' workflow_dispatch: concurrency: @@ -94,8 +101,9 @@ jobs: jq 'del(.install_apps)' ~/frappe-bench/sites/test_site/site_config.json > tmp.json mv tmp.json ~/frappe-bench/sites/test_site/site_config.json - wget https://erpnext.com/files/v13-erpnext.sql.gz - bench --site test_site restore ~/frappe-bench/v13-erpnext.sql.gz + # wget https://erpnext.com/files/v13-erpnext.sql.gz + # wget 20240822_151612-patch_test_localhost-database.sql.gz + # bench --site test_site restore ~/frappe-bench/apps/india_compliance/20240822_151612-patch_test_localhost-database.sql.gz git -C "apps/frappe" remote set-url upstream https://github.com/frappe/frappe.git git -C "apps/erpnext" remote set-url upstream https://github.com/frappe/erpnext.git @@ -148,7 +156,7 @@ jobs: } # update_to_version 14 - update_to_version 15 + # update_to_version 15 echo "Updating to latest version" git -C "apps/frappe" checkout -q -f "${GITHUB_BASE_REF:-${GITHUB_REF##*/}}" diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index 782da7838..8485b2df2 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -12,15 +12,6 @@ on: secrets: codecov_token: - pull_request: - paths-ignore: - - "**.css" - - "**.js" - - "**.md" - - "**.html" - - "**.csv" - - push: branches: [develop, version-14-hotfix, version-14, version-15-hotfix, version-15] paths-ignore: diff --git a/20240822_151612-patch_test_localhost-database.sql.gz b/20240822_151612-patch_test_localhost-database.sql.gz new file mode 100644 index 000000000..e4f02f570 Binary files /dev/null and b/20240822_151612-patch_test_localhost-database.sql.gz differ diff --git a/india_compliance/install.py b/india_compliance/install.py index 8cfbc669a..ef954b442 100644 --- a/india_compliance/install.py +++ b/india_compliance/install.py @@ -77,8 +77,8 @@ def after_install(): def run_post_install_patches(): - # if not frappe.db.exists("Company", {"country": "India"}): - # return + if not frappe.db.exists("Company", {"country": "India"}): + return frappe.flags.in_patch = True