Skip to content
Open
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions data/deploy.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ build_path="./tmp/build-$(date +%s)$RANDOM"

version="<%= next_version %>"
release_path="<%= fetch(:releases_path) %>/$version"
release_relative_path="releases/$version"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Either we do all relative or all absolute.

Or maybe add a configuration variable which would set only the current as relative

Now there are shared paths that are absolute...


# Sanity check
if [ -e "$build_path" ]; then
Expand Down Expand Up @@ -75,7 +76,7 @@ fi
(
echo "-----> Launching"
echo "-----> Updating the <%= fetch(:current_path) %> symlink" &&
<%= echo_cmd %[ln -nfs "$release_path" "#{fetch(:current_path)}"] %>
<%= echo_cmd %[ln -nfs "$release_relative_path" "current"] %>
) &&

# ============================
Expand Down Expand Up @@ -109,7 +110,7 @@ fi
)
(
echo "Unlinking current"
[ -n "$previous_path" ] && <%= echo_cmd %[ln -nfs "$previous_path" "#{fetch(:current_path)}"] %>
[ -n "$previous_path" ] && <%= echo_cmd %[ln -nfs "$previous_path" "current"] %>
)

# Unlock
Expand Down