Skip to content

Commit

Permalink
refactor: refactor previous code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket322 committed Jul 22, 2024
1 parent eba79d5 commit dfef273
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 5 additions & 2 deletions .github/helper/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ wkpid=$!

pip install frappe-bench

git clone "https://github.com/frappe/frappe" --branch "$BRANCH_TO_CLONE" --depth 1
# git clone "https://github.com/frappe/frappe" --branch "$BRANCH_TO_CLONE" --depth 1
git clone "https://github.com/frappe/frappe" --tags "$BRANCH_TO_CLONE" --depth 1
bench init --skip-assets --frappe-path ~/frappe --python "$(which python)" frappe-bench

mkdir ~/frappe-bench/sites/test_site
Expand All @@ -58,8 +59,10 @@ sed -i 's/schedule:/# schedule:/g' Procfile
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 erpnext --branch "$BRANCH_TO_CLONE" --resolve-deps
bench get-app erpnext --tags "$BRANCH_TO_CLONE" --resolve-deps
bench get-app https://github.com/resilient-tech/india-compliance.git --branch "$BRANCH_TO_CLONE" --resolve-deps
bench get-app https://github.com/resilient-tech/india-compliance.git --tags "$BRANCH_TO_CLONE" --resolve-deps
bench setup requirements --dev

wait $wkpid
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
env:
# BRANCH_TO_CLONE: ${{ env.BRANCH_TO_CLONE }}
BRANCH_TO_CLONE: version-14
BRANCH_TO_CLONE: v14.0.0

- name: Run Patch Tests
run: |
Expand All @@ -130,15 +130,10 @@ jobs:
git -C "apps/erpnext" fetch --tags upstream
git -C "apps/india_compliance" fetch --tags upstream
echo "Listing available tags for verification"
git -C "apps/frappe" tag
git -C "apps/erpnext" tag
git -C "apps/india_compliance" tag
echo "Checking out tags"
git -C "apps/frappe" checkout -q -f $tag_name || { echo "Tag $tag_name not found in apps/frappe"; exit 1; }
git -C "apps/erpnext" checkout -q -f $tag_name || { echo "Tag $tag_name not found in apps/erpnext"; exit 1; }
git -C "apps/india_compliance" checkout -q -f $tag_name || { echo "Tag $tag_name not found in apps/india_compliance"; exit 1; }
git -C "apps/frappe" checkout -q -f $tag_name
git -C "apps/erpnext" checkout -q -f $tag_name
git -C "apps/india_compliance" checkout -q -f $tag_name
echo "bench setup requirements"
bench setup requirements --dev
Expand Down

0 comments on commit dfef273

Please sign in to comment.