Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add deployment timestamp #1100

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions R/deployments.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ deploymentRecord <- function(name,
bundleId = NULL,
url = NULL,
version = deploymentRecordVersion,
when = NULL,
metadata = list()) {

check_character(envVars, allow_null = TRUE)
Expand All @@ -147,6 +148,7 @@ deploymentRecord <- function(name,
appId = appId %||% "",
bundleId = bundleId %||% "",
url = url %||% "",
when = when %||% as.numeric(as.POSIXct(Sys.time())),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test confirming that we read the same when data that was written.

version = version
)
# convert any multi-value metadata entries into comma-separated values
Expand All @@ -164,6 +166,7 @@ writeDeploymentRecord <- function(record, filePath) {
addToDeploymentHistory <- function(appPath, deploymentRecord) {
# add the appPath to the deploymentRecord
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deploymentFields needs updating.

deploymentRecord$appPath <- appPath
deploymentRecord$when <- as.numeric(as.POSIXct(Sys.time()))

# write new history file
newHistory <- deploymentHistoryPath(new = TRUE)
Expand Down
Loading