Skip to content

Commit

Permalink
Write commit into install.R for devel install
Browse files Browse the repository at this point in the history
  • Loading branch information
rikardn committed Aug 27, 2024
1 parent 54e010b commit 34f03fc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/actions/check-pharmr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ runs:
devtools::document()
shell: Rscript {0}

- name: Update commit hash for development install
working-directory: pharmr_repo
run: |
import subprocess
commit = subprocess.getoutput("git -C ../pharmpy_repo rev-parse HEAD")
with open("R/install.R", "r") as fp:
lines = fp.readlines()
lines[0] = f'"{commit}"'
with open("R/install.R", "w") as fp:
for line in lines:
fp.write(line)
shell: python

- name: Build source package
run: R CMD build pharmr_repo
shell: bash
Expand Down

0 comments on commit 34f03fc

Please sign in to comment.