-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,26 +3,28 @@ set -o errexit -o nounset | |
addToDrat(){ | ||
PKG_REPO=$PWD | ||
|
||
## Build package tar ball | ||
export PKG_TARBALL=$(ls *.tar.gz) | ||
|
||
cd ..; mkdir drat; cd drat | ||
|
||
## Set up Repo parameters | ||
git init | ||
git config user.name "Marc A. Suchard" | ||
git config user.email "[email protected]" | ||
git config user.name "Martijn Schuemie" | ||
git config user.email "[email protected]" | ||
git config --global push.default simple | ||
|
||
## Get drat repo | ||
git remote add upstream "https://$GH_TOKEN@github.com/OHDSI/drat.git" | ||
git fetch upstream 2>err.txt | ||
git checkout gh-pages | ||
|
||
## Install drat | ||
mkdir -p ~/Rlib | ||
## Link to local R packages | ||
echo 'R_LIBS=~/Rlib' > .Renviron | ||
|
||
Rscript -e "drat::insertPackage('$PKG_REPO/$PKG_TARBALL', \ | ||
repodir = '.', \ | ||
commit='Travis update: $PKG_TARBALL build $TRAVIS_BUILD_NUMBER commit $TRAVIS_REPO_SLUG@$TRAVIS_COMMIT')" | ||
commit='GitHub Actions release: $PKG_TARBALL run $GITHUB_RUN_ID')" | ||
git push | ||
|
||
} | ||
|