[wp-trac] [WordPress Trac] #21633: Switch to min.js convention
WordPress Trac
wp-trac at lists.automattic.com
Mon Aug 20 11:06:08 UTC 2012
#21633: Switch to min.js convention
----------------------------+------------------
Reporter: nbachiyski | Owner:
Type: task (blessed) | Status: new
Priority: normal | Milestone: 3.5
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------
Comment (by nbachiyski):
Notes on the implementation:
The goal is to retain the history for all files. Here is what I came up
with:
{{{
svn cp xxx.js xxx.min.js
svn rm xxx.js
svn mv xxx.dev.js xxx.js
}}}
{{{svn}}} is smart enough to notice we are replacing files. Here is the
{{{svn st}}}:
{{{
A + xxx.min.js
R + xxx.js
D xxx.dev.js
}}}
In my testing this retains the history for all of the files. I would love
if some of your tests on their setups to see if that's true.
Here's a dirty script to do all the needed changes:
{{{find . -name '*.dev.js' -print0 | xargs -0 perl -e 'foreach(@ARGV){
$dev=$_; $min=$js=$dev; $js=~s/\.dev\././; $min=~s/\.dev\./.min./;
system("svn cp $js $min"); system("svn rm $js"); system("svn mv $dev
$js"); }'}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21633#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list