Permalink
Browse files

namespace the timestamp variable.

  • Loading branch information...
1 parent 457b7ec commit b5f4ba12944c133020ff20cc2bfe7f9bd9f88353 @wayneeseguin wayneeseguin committed Dec 16, 2011
Showing with 11 additions and 11 deletions.
  1. +8 −8 shell/functions
  2. +3 −3 shell/initialize
View
@@ -158,7 +158,7 @@ fail_stage()
if path exists "${stage_path}"
then
log step "stage fail ~ Removing staged release ( $stage_path )" \
- path move from "${stage_path}" to "${discard_path}/${timestamp}"
+ path move from "${stage_path}" to "${discard_path}/${deploy_timestamp}"
fi
}
@@ -174,13 +174,13 @@ release()
versionedfs add \
path "${project_path}" \
name "${project}" \
- version ${version:=${timestamp}} \
+ version ${version:=${deploy_timestamp}} \
source "$stage_path"
versionedfs activate \
path "${project_path}" \
name "${project}" \
- version ${version:=${timestamp}}
+ version ${version:=${deploy_timestamp}}
path remove "$stage_path"
@@ -284,9 +284,9 @@ record()
file write string "$repository_url" to "${release_path}/repository_url"
fi
- if variable is nonempty timestamp
+ if variable is nonempty deploy_timestamp
then
- files write string "${timestamp}" to "${release_path}/timestamp"
+ files write string "${deploy_timestamp}" to "${release_path}/timestamp"
fi
}
@@ -358,7 +358,7 @@ do_deploy()
path enter "$release_path"
fi
- log " Deploy started at ${timestamp}"
+ log " Deploy started at ${deploy_timestamp}"
step deploy
log " Deploy completed at $(date +"%Y-%m-%dT%H%M%S")"
}
@@ -406,8 +406,8 @@ fail_release()
if path exists "$stage_path"
then
- log step "discard ~ Discarding stage ( $discard_path/$timestamp )"
- path move from "$stage_path" to "$discard_path/$timestamp"
+ log step "discard ~ Discarding stage ( $discard_path/$deploy_timestamp )"
+ path move from "$stage_path" to "$discard_path/$deploy_timestamp"
log step success
fi
View
@@ -5,7 +5,7 @@ trace_filter "deploy" || set -o xtrace
typeset -gx shared_path project_path stage_path release_path discard_path \
versions_path log_file
-typeset -g previous_releases previous timestamp deploy_log_path \
+typeset -g previous_releases previous deploy_timestamp deploy_log_path \
_hooks_flag environment result
typeset -ga deploy_steps old_releases
@@ -22,7 +22,7 @@ then
log error "The project's repository_url must be set in configuration files (eg: ~/.smrc)"
fi
-timestamp="$(date +"%Y-%m-%dT%H%M%S")"
+deploy_timestamp="$(date +"%Y-%m-%dT%H%M%S")"
versionedfs create \
path "${project_path}" \
@@ -36,7 +36,7 @@ true \
${stage_path:="${project_path}/stage"} \
${release_path:="${project_path}/active/${project}"} \
${versions_path:="${project_path}/versions/${project}"} \
- ${deploy_log_path:="${shared_path}/log/deploy/${timestamp}"} \
+ ${deploy_log_path:="${shared_path}/log/deploy/${deploy_timestamp}"} \
${_hooks_flag:=1}
paths create "$deploy_log_path"

0 comments on commit b5f4ba1

Please sign in to comment.