boB Rudis
5 years ago
14 changed files with 366 additions and 157 deletions
@ -0,0 +1,25 @@ |
|||
# Contributor Code of Conduct |
|||
|
|||
As contributors and maintainers of this project, we pledge to respect all people who |
|||
contribute through reporting issues, posting feature requests, updating documentation, |
|||
submitting pull requests or patches, and other activities. |
|||
|
|||
We are committed to making participation in this project a harassment-free experience for |
|||
everyone, regardless of level of experience, gender, gender identity and expression, |
|||
sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. |
|||
|
|||
Examples of unacceptable behavior by participants include the use of sexual language or |
|||
imagery, derogatory comments or personal attacks, trolling, public or private harassment, |
|||
insults, or other unprofessional conduct. |
|||
|
|||
Project maintainers have the right and responsibility to remove, edit, or reject comments, |
|||
commits, code, wiki edits, issues, and other contributions that are not aligned to this |
|||
Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed |
|||
from the project team. |
|||
|
|||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by |
|||
opening an issue or contacting one or more of the project maintainers. |
|||
|
|||
This Code of Conduct is adapted from the Contributor Covenant |
|||
(http:contributor-covenant.org), version 1.0.0, available at |
|||
http://contributor-covenant.org/version/1/0/0/ |
@ -0,0 +1,39 @@ |
|||
#' Check application notarization info |
|||
#' |
|||
#' @param path_to_app the path to the application or comand line binary |
|||
#' @export |
|||
check_notarization <- function(path_to_app) { |
|||
|
|||
vers <- sw_vers() |
|||
stopifnot(utils::compareVersion(vers$ProductVersion[1], "10.14") >= 0) |
|||
|
|||
path_to_app <- path.expand(path_to_app[1]) |
|||
stopifnot(file.exists(path_to_app)) |
|||
|
|||
spctl <- Sys.which("spctl") |
|||
|
|||
res <- sys::exec_internal(spctl, arg = c("-a", "-vv", path_to_app)) |
|||
|
|||
if (res$status != 0) { |
|||
stop("Error running spctl utility Are you on macOS?", call.=FALSE) |
|||
} |
|||
|
|||
out <- rawToChar(res$stderr) |
|||
out <- unlist(stringi::stri_split_lines(out)) |
|||
out <- out[out != ""] |
|||
|
|||
app_status <- dplyr::tibble( |
|||
key = c("application", "status"), |
|||
value = trimws(unlist(stri_split_fixed(out[1], ":", 2))) |
|||
) |
|||
|
|||
out <- stringi::stri_split_fixed(out[2:length(out)], "=", n=2, simplify=TRUE) |
|||
out <- as.data.frame(out, stringsAsFactors=FALSE) |
|||
out <- dplyr::as_tibble(out) |
|||
colnames(out) <- c("key", "value") |
|||
|
|||
out <- dplyr::bind_rows(app_status, out) |
|||
|
|||
out |
|||
|
|||
} |
@ -0,0 +1,28 @@ |
|||
#' Check application signature/notarization information |
|||
#' |
|||
#' @param path_to_app the path to the application or comand line binary |
|||
#' @export |
|||
check_sig <- function(path_to_app) { |
|||
|
|||
path_to_app <- path.expand(path_to_app[1]) |
|||
stopifnot(file.exists(path_to_app)) |
|||
|
|||
codesign <- Sys.which("codesign") |
|||
|
|||
res <- sys::exec_internal(codesign, arg = c("-dvvvv", path_to_app)) |
|||
|
|||
if (res$status != 0) { |
|||
stop("Error running codesign utility. Are you on macOS?", call.=FALSE) |
|||
} |
|||
|
|||
out <- rawToChar(res$stderr) |
|||
out <- unlist(stringi::stri_split_lines(out)) |
|||
out <- out[out != ""] |
|||
out <- stringi::stri_split_fixed(out, "=", n=2, simplify=TRUE) |
|||
out <- as.data.frame(out, stringsAsFactors=FALSE) |
|||
out <- dplyr::as_tibble(out) |
|||
colnames(out) <- c("key", "value") |
|||
|
|||
out |
|||
|
|||
} |
Binary file not shown.
@ -0,0 +1,14 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/check-notary.R |
|||
\name{check_notarization} |
|||
\alias{check_notarization} |
|||
\title{Check application notarization info} |
|||
\usage{ |
|||
check_notarization(path_to_app) |
|||
} |
|||
\arguments{ |
|||
\item{path_to_app}{the path to the application or comand line binary} |
|||
} |
|||
\description{ |
|||
Check application notarization info |
|||
} |
@ -0,0 +1,14 @@ |
|||
% Generated by roxygen2: do not edit by hand |
|||
% Please edit documentation in R/check_sig.R |
|||
\name{check_sig} |
|||
\alias{check_sig} |
|||
\title{Check application signature/notarization information} |
|||
\usage{ |
|||
check_sig(path_to_app) |
|||
} |
|||
\arguments{ |
|||
\item{path_to_app}{the path to the application or comand line binary} |
|||
} |
|||
\description{ |
|||
Check application signature/notarization information |
|||
} |
Loading…
Reference in new issue