Skip to content

Commit

Permalink
remove git module from devbuild script
Browse files Browse the repository at this point in the history
  • Loading branch information
rjkiv committed Jan 23, 2023
1 parent db202da commit 801742f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions dependencies/dev_scripts/add_devbuild.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# add_devbuild.py
from pathlib import Path
import sys
import git

def main():
if len(sys.argv) != 2:
print("no devbuild provided")
else:
commit = sys.argv[1]
print(f"Commit: {commit}")
cwd = Path().absolute() # current working directory (dev_scripts)
root_dir = cwd.parents[1] # root directory of the repo

repo = git.Repo(search_parent_directories=True)
sha = repo.head.commit.hexsha
short_sha = repo.git.rev_parse(sha, short=4)
print(f"Short sha: {short_sha}")
# get the current working directory (where this script resides)
cwd = Path().absolute()
# get the root directory of the repo
root_dir = Path(__file__).parents[2]
print(root_dir)
# sed -i -e "s/devbuild/"$GITHUB_SHA_SHORT"/g" _ark/ui/locale/*/locale_updates_keep.dta
for locale in root_dir.joinpath("_ark/ui/locale").glob("*/locale_updates_keep.dta"):
Expand Down

0 comments on commit 801742f

Please sign in to comment.