diff --git a/standalone/unix/build_release.R b/standalone/unix/build_release.R new file mode 100644 index 0000000..aca037f --- /dev/null +++ b/standalone/unix/build_release.R @@ -0,0 +1,44 @@ +## build the release bundle and upload to github +setwd("/path/to/ovscout2") + +pwd <- getwd() +if (!file.exists("DESCRIPTION")) stop("cannot find DESCRIPTION file, are you in the ovscout2 repo base directory?") +pkgInfo <- read.dcf("DESCRIPTION") +if (!identical(pkgInfo[colnames(pkgInfo) == "Package"], "ovscout2")) stop("DESCRIPTION file does not belong to ovscout2, are you in the ovscout2 repo base directory?") +this_release <- NULL +if ("Version" %in% colnames(pkgInfo)) this_release <- pkgInfo[colnames(pkgInfo) == "Version"] +if (is.null(this_release)) stop("could not determine the version of ovscout2") +this_release <- paste0("v", this_release) + +tmpdir <- tempfile() +dir.create(tmpdir) + +file.copy("inst/extdata/standalone/unix/ov_scouter", tmpdir, overwrite = TRUE) +file.copy("inst/extdata/standalone/unix/ov_scouter_demo", tmpdir, overwrite = TRUE) +file.copy("inst/extdata/standalone/unix/ov_scouter-nonportable.R", tmpdir, overwrite = TRUE) + +setwd(tmpdir) + +## zip everything up +zipfile <- file.path(tmpdir, "ovscout2-unix-x64.zip") +cat("zipping ...\n") +res <- utils::zip(zipfile, files = c("ov_scouter", "ov_scouter_demo", "ov_scouter-nonportable.R")) +if (res == 0L) { + cat("OK.\n") +} else { + stop("zip failed with error code ", res) +} + +setwd(pwd) + +## upload to github +## needs your GITHUB_TOKEN env var set + +library(piggyback) + +rel_info <- pb_list("openvolley/ovscout2") ## existing releases +if (is.null(rel_info) || !any(this_release %in% rel_info$tag)) { + pb_new_release("openvolley/ovscout2", this_release) + ## that might not work until issue resolved in piggyback pkg +} +pb_upload(zipfile, repo = "openvolley/ovscout2", name = "ovscout2-unix-x64.zip") diff --git a/standalone/win/build_release.R b/standalone/win/build_release.R index d096c7d..176d159 100644 --- a/standalone/win/build_release.R +++ b/standalone/win/build_release.R @@ -68,7 +68,7 @@ if (res == 0L) { stop("zip failed with error code ", res) } -file.copy(zipfile, "ovscout2-x64.zip") +file.copy(zipfile, "ovscout2-win-x64.zip") setwd(pwd) .libPaths(old_libpaths) @@ -83,4 +83,4 @@ if (is.null(rel_info) || !any(this_release %in% rel_info$tag)) { pb_new_release("openvolley/ovscout2", this_release) ## that might not work until issue resolved in piggyback pkg } -pb_upload(zipfile, repo = "openvolley/ovscout2", name = "ovscout2-x64.zip") +pb_upload(zipfile, repo = "openvolley/ovscout2", name = "ovscout2-win-x64.zip") diff --git a/vignettes/ovscout2-user-manual.Rmd b/vignettes/ovscout2-user-manual.Rmd index 9dabe68..62b479c 100644 --- a/vignettes/ovscout2-user-manual.Rmd +++ b/vignettes/ovscout2-user-manual.Rmd @@ -33,15 +33,19 @@ The standalone installer allows you to run the app without having to do anything ### Windows -1. Download the `ovscout2-x64.zip` file and unzip it to a convenient location. +1. Download the `ovscout2-win-x64.zip` file and unzip it to a convenient location. -2. Run the `ov_scouter.bat` or `ov_scouter_demo.bat` file. The first run will take quite some time, because it will install a number of additional R packages. Subsequent startups will be much faster (it checks for updates on each startup, so might reinstall some packages on occasion). +1. Run the `ov_scouter.bat` or `ov_scouter_demo.bat` file. The first run will take quite some time, because it will install a number of additional R packages. Subsequent startups will be much faster (it checks for updates on each startup, so might reinstall some packages on occasion). ### Linux/Mac 1. Install R, following https://cran.r-project.org/ -2. Run the `ov_scouter` or `ov_scouter_demo` script. The first run will take quite some time, because it will install a number of additional R packages. Subsequent startups will be much faster (it checks for updates on each startup, so might reinstall some packages on occasion). +1. Download the `ovscout2-unix-x64.zip` file and unzip it to a convenient location. + +1. Run the `ov_scouter` or `ov_scouter_demo` script. The first run will take quite some time, because it will install a number of additional R packages. Subsequent startups will be much faster (it checks for updates on each startup, so might reinstall some packages on occasion). + +Note: not tested on Mac. ## Installation from R