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

Simplify legacy applab docs sync #33922

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 0 additions & 7 deletions bin/cron/sync_dropbox
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ exit unless only_one_running?(__FILE__)

FOLDERS = {
"advocacy.code.org" => "sites.v3/advocacy.code.org",
"applab-docs-1" => "sites.v3/code.org/public/applab/docs1",
"applab-docs" => "sites.v3/code.org/public/applab/docs",
"code.org" => "sites.v3/code.org",
"csedweek.org" => "sites.v3/csedweek.org",
"curriculum-6-8" => "sites/virtual/curriculum-6-8",
Expand Down Expand Up @@ -43,11 +41,6 @@ while (Time.now - SCRIPT_START) < TOTAL_SECONDS
# 'unison' will sync the two folders. It will return true on success and false on failure.
# For full details, see unison's man page. Docs are also here: https://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html
command = "unison /home/ubuntu/Dropbox/Shared/#{key} /home/ubuntu/staging/pegasus/#{value} -silent -ignore \"Name .dropbox\" -auto -perms 0 -dontchmod"
if key == "code.org"
# The applab-docs and applab-docs-1 folders on dropbox are synced separately even though
# they are sub-paths of the code.org folder on git.
command << " -ignore \"Path */public/applab/docs\" -ignore \"Path */public/applab/docs1\""
end
stdout, stderr, _ = Open3.capture3(command)
if stdout != "" || stderr != ""
error_message = "#{error_message}Dropbox directory: #{key}. staging directory: #{value}. \n#{stdout}#{stderr}\n"
Expand Down