Skip to content

Commit

Permalink
update python script
Browse files Browse the repository at this point in the history
  • Loading branch information
TruongQuangSB committed Sep 12, 2024
1 parent d16f119 commit a40a6ec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ parties. The goal is to have a common technology core for using the toolbox as
widely accepted standalone product as well as the possibility to use its
technology, ie. emf model, in derived custom solutions.



* https://projects.eclipse.org/projects/technology.set

# Contributing
Expand Down
1 change: 1 addition & 0 deletions java-test/update-table-reference/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
7 changes: 5 additions & 2 deletions java-test/update-table-reference/updatereference/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ def apply_changes(branch_name: str, download_url: str):
CONSTANT.SET_REMOTE_URL, CONSTANT.SET_LOCA_REPO_PATH, "truongquang-test"
)
update_table_reference(download_url)
if set_repo.is_dirty(untracked_files=True):
set_repo.git.add(A=True)
reference_path = (
f"{CONSTANT.SET_LOCA_REPO_PATH}/{CONSTANT.SET_TABLE_REFERENCE_PATH}"
)
if set_repo.is_dirty(untracked_files=True, path=reference_path):
set_repo.git.add(reference_path)
set_repo.index.commit(f"{branch_name} update table reference")
set_repo.remote().push()
print(f"{branch_name} update table reference")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Literal
from requests import request, Response
import urllib.parse
from java-test.update-table-reference.updatereference.constant import CONSTANT
from constant import CONSTANT
import time
from io import BytesIO
from datetime import datetime, timezone
Expand Down

0 comments on commit a40a6ec

Please sign in to comment.