Replace dev versions with -alpha versions for JS code (#3435)

This commit is contained in:
Barret Schloerke
2021-06-17 16:02:39 -04:00
committed by GitHub
parent 7c0829d553
commit 61ee467dee
2 changed files with 3 additions and 2 deletions

View File

@@ -128,7 +128,8 @@ jobs:
run: |
Rscript -e 'pak::pkg_install("jsonlite")'
Rscript -e 'pkg <- jsonlite::read_json("package.json", simplifyVector = TRUE)' \
-e 'pkg$version <- as.list(read.dcf("DESCRIPTION")[1,])$Version' \
-e 'version <- as.list(read.dcf("DESCRIPTION")[1,])$Version' \
-e 'pkg$version <- gsub("^(\\d+).(\\d+).(\\d+).(.+)$", "\\1.\\2.\\3-alpha.\\4", version)' \
-e 'pkg$files <- as.list(pkg$files)' \
-e 'jsonlite::write_json(pkg, path = "package.json", pretty = TRUE, auto_unbox = TRUE)'
git add package.json && git commit -m 'sync package version (GitHub Actions)' || echo "No version changes to commit"