Personally, I think the whole change is unnecessary, what value comes from known when the code was compiled? Doesn't the svn revision tell us enough?
If you intend to keep it, it would be nice to see the additional ant targets go away, can't the work be done within the targets that deal with the svn revision? It all just feels like additional clutter for minimal gain. Backporting or not makes no difference to me, clutter in the trunk will soon make it to new releases anyway. Regards Scott On 16/09/2014, at 12:08 am, Jacques Le Roux <[email protected]> wrote: > > Le 15/09/2014 01:09, Scott Gray a écrit : >> - Does this commit remove the CommonDepth UiLabel? > Oops, that was an error indeed, fixed >> - the timestamp indicates when the code was built, not when it was deployed > In my mind it depends on when you run the (new name) deployed-on ant target. > The idea is to run it when you deploy, not (only) when you build. Do you > think we should better call it "Build on" and let the user decide of when to > use it? > PS: Ha I guess I see why you said that. My proposition was not clear, I have > just committed a fix. I wonder now indeed if the deployed-on and > clean-deployed-on targets should not work like svninfo. it does not make much > sense to disconnect last build and last deployment. They are mostly done at > the same time, maybe not? Opinions ? > > One think to note though: I used this way because if we use the same way than > svninfo (chain clean-deployed-on in build target like we do for > clean-svninfo) then I don't know how to hide the CommonDeployedOn when > clean-deployed-on and it had to be a i18n label (Release.revision are no l10n > but it seems we don't care). >> - Why use the format 2014/09/14 12:34:56 instead of the timestamp format we >> use everywhere else (2014-09-14 12:34:56)? > Good point, I did not notice I used the French form, fixed >> - "Deployed on 2014-09-14 12:34:56" reads better than "Deployed the >> 2014-09-14 12:34:56" > > Thanks for your review! > > What do you think about backporting now that the points above have been > clarified/fixed? > The reason I'd like to backport are mostly the official demos, but not only > > Jacques > >> >> Regards >> Scott >> >> On 15/09/2014, at 5:56 am, [email protected] wrote: >> >>> Author: jleroux >>> Date: Sun Sep 14 17:56:34 2014 >>> New Revision: 1624886 >>> >>> URL: http://svn.apache.org/r1624886 >>> Log: >>> Adds deployed-date-time and clean-deployed-date-time targets. To set the >>> date and time of last deployment info in the footer >>> Puts a check on svinfo and gitinfo (only used if it's a local copy) >>> Adds and uses CommonDeployedThe label in footer.ftl with the new >>> deployed-date-time target >>> Uses CommonPoweredBy in bizznesstime footer.ftl >>> Minor changes and formatting in the footer.ftl files >>> Better French label for CommonPoweredBy >>> >>> Modified: >>> ofbiz/trunk/build.xml >>> ofbiz/trunk/framework/common/config/CommonUiLabels.xml >>> ofbiz/trunk/runtime/ (props changed) >>> ofbiz/trunk/themes/bizznesstime/includes/footer.ftl >>> ofbiz/trunk/themes/droppingcrumbs/includes/footer.ftl >>> ofbiz/trunk/themes/flatgrey/includes/footer.ftl >>> ofbiz/trunk/themes/tomahawk/includes/footer.ftl >>> >>> Modified: ofbiz/trunk/build.xml >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=1624886&r1=1624885&r2=1624886&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/build.xml (original) >>> +++ ofbiz/trunk/build.xml Sun Sep 14 17:56:34 2014 >>> @@ -212,16 +212,21 @@ under the License. >>> <target name="svninfo" >>> description="Update the Release-revision info in the footer. Note >>> that you need a valid Internet connection and Subversion connected to the >>> OFBiz repository for that "> >>> <echo message="Creating svninfo..."/> >>> - <exec executable="svn" dir="." output="runtime/svninfo_tmp.xml"> >>> + <exec executable="svn" dir="." output="runtime/svninfo_tmp.xml" >>> failonerror="true" resultproperty="hasSvnRepo"> >>> <arg value="info"/> >>> <arg value="--xml"/> >>> </exec> >>> - <xmlproperty file="runtime/svninfo_tmp.xml"/> >>> - <echo message="Rev:${info.entry.commit(revision)}"/> >>> - <basename property="releasePath" file="${info.entry.url}"/> >>> - <echo message=" - Release-revision : >>> ${releasePath}-r${info.entry.commit(revision)} @ ${info.entry.commit.date}" >>> file="runtime/svninfo.ftl"/> >>> - <delete file="runtime/svninfo_tmp.xml"/> >>> - <echo message="Done!"/> >>> + <if> >>> + <isset property="hasSvnRepo"/> >>> + <then> >>> + <xmlproperty file="runtime/svninfo_tmp.xml"/> >>> + <basename property="releasePath" file="${info.entry.url}"/> >>> + <echo message="Found Release-revision: >>> ${releasePath}-r${info.entry.commit(revision)}"/> >>> + <echo message=" - Release-revision : >>> ${releasePath}-r${info.entry.commit(revision)}" file="runtime/svninfo.ftl"/> >>> + <delete file="runtime/svninfo_tmp.xml"/> >>> + <echo message="Done!"/> >>> + </then> >>> + </if> >>> </target> >>> >>> <target name="clean-svninfo"> >>> @@ -238,13 +243,18 @@ under the License. >>> <arg value="--abbrev-ref"/> >>> <arg value="HEAD"/> >>> </exec> >>> - <exec executable="git" outputproperty="revision"> >>> + <exec executable="git" outputproperty="revision" >>> failonerror="true" resultproperty="hasGitRepo"> >>> <arg value="rev-parse"/> >>> <arg value="HEAD"/> >>> </exec> >>> - <echo message="Found Branch-revision: ${branch}-${revision}"/> >>> - <echo message=" - Branch-revision: ${branch}-${revision}" >>> file="runtime/gitinfo.ftl"/> >>> - <echo message="Done!"/> >>> + <if> >>> + <isset property="hasGitRepo"/> >>> + <then> >>> + <echo message="Found Branch-revision: >>> ${branch}-${revision}"/> >>> + <echo message=" - Branch-revision: ${branch}-${revision}" >>> file="runtime/gitinfo.ftl"/> >>> + <echo message="Done!"/> >>> + </then> >>> + </if> >>> </target> >>> >>> <target name="clean-gitinfo"> >>> @@ -252,7 +262,22 @@ under the License. >>> <echo message=" " file="runtime/gitinfo.ftl"/> >>> <echo message="Done!"/> >>> </target> >>> + >>> + <target name="deployed-date-time" >>> + description="Set the date and time of last deployment info in the >>> footer."> >>> + <tstamp> >>> + <format property="dateTime" pattern="yyyy/MM/dd HH:mm:ss"/> >>> + </tstamp> >>> + <echo message="${dateTime}" file="runtime/deployedThe.ftl"/> >>> + <echo message="Done!"/> >>> + </target> >>> >>> + <target name="clean-deployed-date-time"> >>> + <echo message="Resetting deployed-date-time..."/> >>> + <echo message=" " file="runtime/deployedThe.ftl"/> >>> + <echo message="Done!"/> >>> + </target> >>> + >>> <!-- ================================================================== >>> --> >>> <!-- Apply patches where needed >>> --> >>> <!-- ================================================================== >>> --> >>> >>> Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=1624886&r1=1624885&r2=1624886&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) >>> +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Sun Sep 14 >>> 17:56:34 2014 >>> @@ -2766,25 +2766,9 @@ >>> <value xml:lang="zh">åˆ é™¤è¯¥å°çª—å£</value> >>> <value xml:lang="zh_TW">åˆ é™¤æ¤Portlet</value> >>> </property> >>> - <property key="CommonDepth"> >>> - <value xml:lang="ar">ع٠>>> Ù‚</value> >>> - <value xml:lang="cs">Hloubka</value> >>> - <value xml:lang="de">Tiefe</value> >>> - <value xml:lang="en">Depth</value> >>> - <value xml:lang="es">Profundidad</value> >>> - <value xml:lang="fr">Profondeur</value> >>> - <value xml:lang="hi-IN">गहराई</value> >>> - <value xml:lang="it">Profondità </value> >>> - <value xml:lang="ja">深度</value> >>> - <value xml:lang="nl">Diepte</value> >>> - <value xml:lang="pt">Profundidade</value> >>> - <value xml:lang="ro">Adancime</value> >>> - <value xml:lang="ru">Глубина</value> >>> - <value xml:lang="th">ความลึà¸</value> >>> - <value xml:lang="vi">Äá»™ dà y</value> >>> - <value xml:lang="zh">深度</value> >>> - <value xml:lang="zh-CN">深度</value> >>> - <value xml:lang="zh_TW">深度</value> >>> + <property key="CommonDeployedThe"> >>> + <value xml:lang="en">Deployed the</value> >>> + <value xml:lang="fr">Déployé le</value> >>> </property> >>> <property key="CommonDescription"> >>> <value xml:lang="ar">وصÙ</value> >>> @@ -8424,7 +8408,7 @@ >>> </property> >>> <property key="CommonPoweredBy"> >>> <value xml:lang="en">Powered by</value> >>> - <value xml:lang="fr">Fonctionne grâce à </value> >>> + <value xml:lang="fr">Motorisé par</value> >>> <value xml:lang="hi-IN">दà¥à¤µà¤¾à¤°à¤¾ >>> संचालित</value> >>> <value xml:lang="it">Realizzato con</value> >>> <value xml:lang="ru">Сделанно</value> >>> >>> Propchange: ofbiz/trunk/runtime/ >>> ------------------------------------------------------------------------------ >>> --- svn:ignore (original) >>> +++ svn:ignore Sun Sep 14 17:56:34 2014 >>> @@ -4,3 +4,4 @@ data.zip >>> test-list-build.xml >>> uploads >>> gitinfo.ftl >>> +deployedThe.ftl >>> >>> Modified: ofbiz/trunk/themes/bizznesstime/includes/footer.ftl >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/footer.ftl?rev=1624886&r1=1624885&r2=1624886&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/themes/bizznesstime/includes/footer.ftl (original) >>> +++ ofbiz/trunk/themes/bizznesstime/includes/footer.ftl Sun Sep 14 17:56:34 >>> 2014 >>> @@ -25,8 +25,12 @@ under the License. >>> </div> >>> <!-- footer --> >>> <div id="footer"> >>> - <div class="poweredBy"><span>Powered by <a >>> href="http://ofbiz.apache.org" >>> class="noicon">OFBiz</a></span><span>Copyright >>> 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" >>> class="noicon">The Apache Software Foundation - >>> www.apache.org</a></span><span><#include "ofbizhome://runtime/svninfo.ftl" >>> /> <#include "ofbizhome://runtime/gitinfo.ftl" /></span></div> >>> - >>> + <div class="poweredBy"> >>> + <span> >>> + ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" >>> class="noicon">OFBiz</a></span><span>Copyright >>> 2001-${nowTimestamp?string("yyyy")} <a href="http://www.apache.org" >>> class="noicon">The Apache Software Foundation - www.apache.org</a> >>> + <#include "ofbizhome://runtime/svninfo.ftl" /> <#include >>> "ofbizhome://runtime/gitinfo.ftl" /> <#attempt> - >>> ${uiLabelMap.CommonDeployedThe} <#include >>> "ofbizhome://runtime/deployedThe.ftl" /><#recover></#attempt> >>> + </span> >>> + </div> >>> </div> >>> <!-- footer --> >>> </body> >>> >>> Modified: ofbiz/trunk/themes/droppingcrumbs/includes/footer.ftl >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/includes/footer.ftl?rev=1624886&r1=1624885&r2=1624886&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/themes/droppingcrumbs/includes/footer.ftl (original) >>> +++ ofbiz/trunk/themes/droppingcrumbs/includes/footer.ftl Sun Sep 14 >>> 17:56:34 2014 >>> @@ -26,8 +26,10 @@ under the License. >>> <p><a href="http://jigsaw.w3.org/css-validator/"><img >>> src="<@ofbizContentUrl>/images/vcss.gif</@ofbizContentUrl>" alt="Valid >>> CSS!"/></a> >>> <a href="http://validator.w3.org/check?uri=referer"><img >>> src="<@ofbizContentUrl>/images/valid-xhtml10.png</@ofbizContentUrl>" >>> alt="Valid XHTML 1.0!"/></a></p> >>> <p> >>> - ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} >>> The Apache Software Foundation - <a href="http://www.apache.org" >>> target="_blank">www.apache.org</a><br /> >>> - ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" >>> target="_blank">Apache OFBiz</a> <#include >>> "ofbizhome://runtime/svninfo.ftl" /> <#include >>> "ofbizhome://runtime/gitinfo.ftl" /></p> >>> + ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} >>> The Apache Software Foundation - <a href="http://www.apache.org" >>> target="_blank">www.apache.org</a><br /> >>> + ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" >>> target="_blank">Apache OFBiz</a> <#include >>> "ofbizhome://runtime/svninfo.ftl" /> <#include >>> "ofbizhome://runtime/gitinfo.ftl" /> >>> + <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include >>> "ofbizhome://runtime/deployedThe.ftl" /><#recover></#attempt> >>> + </p> >>> </div> >>> <#if layoutSettings.VT_FTR_JAVASCRIPT?has_content> >>> <#list layoutSettings.VT_FTR_JAVASCRIPT as javaScript> >>> >>> Modified: ofbiz/trunk/themes/flatgrey/includes/footer.ftl >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/includes/footer.ftl?rev=1624886&r1=1624885&r2=1624886&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/themes/flatgrey/includes/footer.ftl (original) >>> +++ ofbiz/trunk/themes/flatgrey/includes/footer.ftl Sun Sep 14 17:56:34 2014 >>> @@ -23,7 +23,9 @@ under the License. >>> <li class="last"><a >>> href="<@ofbizUrl>ListVisualThemes</@ofbizUrl>">${uiLabelMap.CommonVisualThemes}</a></li> >>> </ul> >>> <p> >>> - ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} <a >>> href="http://www.apache.org" target="_blank">The Apache Software >>> Foundation</a>. ${uiLabelMap.CommonPoweredBy} <a >>> href="http://ofbiz.apache.org" target="_blank">Apache OFBiz.</a> <#include >>> "ofbizhome://runtime/svninfo.ftl" /> <#include >>> "ofbizhome://runtime/gitinfo.ftl" /> >>> + ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} >>> <a href="http://www.apache.org" target="_blank">The Apache Software >>> Foundation</a>. >>> + ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" >>> target="_blank">Apache OFBiz</a> <#include >>> "ofbizhome://runtime/svninfo.ftl" /> <#include >>> "ofbizhome://runtime/gitinfo.ftl" /> >>> + <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include >>> "ofbizhome://runtime/deployedThe.ftl" /><#recover></#attempt> >>> </p> >>> </div> >>> </div> >>> >>> Modified: ofbiz/trunk/themes/tomahawk/includes/footer.ftl >>> URL: >>> http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/footer.ftl?rev=1624886&r1=1624885&r2=1624886&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/themes/tomahawk/includes/footer.ftl (original) >>> +++ ofbiz/trunk/themes/tomahawk/includes/footer.ftl Sun Sep 14 17:56:34 2014 >>> @@ -24,6 +24,7 @@ under the License. >>> <li> >>> ${uiLabelMap.CommonCopyright} (c) 2001-${nowTimestamp?string("yyyy")} >>> The Apache Software Foundation - <a href="http://www.apache.org" >>> target="_blank">www.apache.org</a><br/> >>> ${uiLabelMap.CommonPoweredBy} <a href="http://ofbiz.apache.org" >>> target="_blank">Apache OFBiz</a> <#include >>> "ofbizhome://runtime/svninfo.ftl" /> <#include >>> "ofbizhome://runtime/gitinfo.ftl" /> >>> + <#attempt> - ${uiLabelMap.CommonDeployedThe} <#include >>> "ofbizhome://runtime/deployedThe.ftl" /><#recover> </#attempt> >>> </li> >>> <li class="opposed">${nowTimestamp?datetime?string.short} - >>> <a >>> href="<@ofbizUrl>ListTimezones</@ofbizUrl>">${timeZone.getDisplayName(timeZone.useDaylightTime(), >>> Static["java.util.TimeZone"].LONG, locale)}</a> >>> >>> >> >> >
