Skip to content

Commit

Permalink
fix: installing india_compliance app in site
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Jul 21, 2024
1 parent 49efc30 commit 803cd21
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ 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 get-app india_compliance "${GITHUB_WORKSPACE}"
bench get-app https://github.com/resilient-tech/india-compliance.git --branch "$BRANCH_TO_CLONE" --resolve-deps
bench setup requirements --dev

wait $wkpid
Expand Down
72 changes: 38 additions & 34 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,46 +111,50 @@ 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 --force restore ~/frappe-bench/v13-erpnext.sql.gz
# wget https://erpnext.com/files/v13-erpnext.sql.gz
# bench --site test_site restore ~/frappe-bench/v13-erpnext.sql.gz
echo "Listing all apps"
bench --site test_site list-apps
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
git -C "apps/india_compliance" remote set-url upstream https://github.com/resilient-tech/india-compliance.git
function update_to_version() {
version=$1
branch_name="version-$version-hotfix"
echo "Updating to v$version"
echo "fetch branches"
git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/india_compliance" fetch --depth 1 upstream $branch_name:$branch_name
echo "checout to branches"
git -C "apps/frappe" checkout -q -f $branch_name
git -C "apps/erpnext" checkout -q -f $branch_name
git -C "apps/india_compliance" checkout -q -f $branch_name
echo "Resetup env and install apps"
pgrep honcho | xargs kill
rm -rf ~/frappe-bench/env
bench -v setup env
echo "Install Erpnext"
bench pip install -e ./apps/erpnext
echo "Install India Compliance"
bench pip install -e ./apps/india_compliance
bench start &>> ~/frappe-bench/bench_start.log &
echo "Listing apps"
bench --site test_site list-apps
bench --site test_site migrate
version=$1
branch_name="version-$version-hotfix"
echo "Updating to v$version"
echo "Fetching branches"
git -C "apps/frappe" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/erpnext" fetch --depth 1 upstream $branch_name:$branch_name
git -C "apps/india_compliance" fetch --depth 1 upstream $branch_name:$branch_name
echo "Checking out branches"
git -C "apps/frappe" checkout -q -f $branch_name
git -C "apps/erpnext" checkout -q -f $branch_name
git -C "apps/india_compliance" checkout -q -f $branch_name
bench --site test_site install-app india_compliance
echo "Resetting environment and installing apps"
pgrep honcho | xargs kill || true
rm -rf ~/frappe-bench/env
bench -v setup env
echo "Installing ERPNext"
bench pip install -e ./apps/erpnext
echo "Installing India Compliance"
bench pip install -e ./apps/india_compliance
echo "Starting bench"
bench start &>> ~/frappe-bench/bench_start.log &
echo "Migrating site"
bench --site test_site migrate
}
update_to_version 14
Expand Down

0 comments on commit 803cd21

Please sign in to comment.