You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/07/02 21:26:56 UTC
[whimsy] branch master updated: Use library routines
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 24b7124 Use library routines
24b7124 is described below
commit 24b712428b3220e5fca5148637ba9e1d91e3433d
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jul 2 22:26:46 2020 +0100
Use library routines
---
www/board/agenda/views/actions/publish.json.rb | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/www/board/agenda/views/actions/publish.json.rb b/www/board/agenda/views/actions/publish.json.rb
index dd1ec11..0233b69 100755
--- a/www/board/agenda/views/actions/publish.json.rb
+++ b/www/board/agenda/views/actions/publish.json.rb
@@ -73,17 +73,17 @@ minutes = "board_minutes_#{@date}.txt"
#Commit the Minutes
ASF::SVN.update MINUTES, @message, env, _ do |tmpdir|
yeardir = File.join(tmpdir, year.to_s).untaint
- _.system "svn up #{yeardir}"
+ ASF::SVN.svn_('update', yeardir, _) # TODO does this need auth?
unless Dir.exist? yeardir
- _.system "mkdir #{yeardir}"
- _.system "svn add #{yeardir}"
+ _.system('mkdir', yeardir)
+ ASF::SVN.svn_('add', yeardir, _)
end
year_minutes = File.join(yeardir, minutes)
if not File.exist? year_minutes
- _.system "cp #{File.join(BOARD_PRIVATE, minutes)} #{yeardir}"
- _.system "svn add #{year_minutes}"
+ _.system('cp', File.join(BOARD_PRIVATE, minutes), yeardir)
+ ASF::SVN.svn_('add', year_minutes, _)
end
end
@@ -97,17 +97,17 @@ end
# Clean up board directory
ASF::SVN.update BOARD_PRIVATE, @message, env, _ do |tmpdir|
minutes_path = File.join(tmpdir, minutes)
- _.system "svn up #{minutes_path}"
+ ASF::SVN.svn_('update', minutes_path, _)
if File.exist? minutes_path
- _.system "svn rm #{minutes_path}"
+ ASF::SVN.svn_('rm', minutes_path, _)
end
agenda_path = File.join(tmpdir, "board_agenda_#{@date}.txt")
- _.system "svn up #{agenda_path}"
+ ASF::SVN.svn_('update', agenda_path, _)
if File.exist? agenda_path
agenda_archive = File.join(tmpdir, 'archived_agendas')
- _.system "svn up --depth empty #{agenda_archive}"
- _.system "svn mv #{agenda_path} #{agenda_archive}"
+ ASF::SVN.svn_('update', agenda_archive, _, {depth: empty})
+ ASF::SVN.svn_('mv', [agenda_path, agenda_archive], _)
end
end