Lead paragraph for Git Clone Canvas page.

There are a couple of new bat files/scripts in the Canvas git repo that help us setup a new site via the command line; over ssh.

Cloning

Use the regular git clone command like :

git clone --depth 0 -b BRANCH ssh://git@git.net4orce.co.uk:2222/net4orce_canvas.git v1.09

Replace BRANCH with the name of the branch - bootstrap3, master etc.

See below for the folder definitions.

Set Permissions

ICACLS.exe is the equlivant to *nix / postix OS's chown / chmod but nt quite as friendly, so I've created a permssions.bat script that sets the permissions as follows :

  • Full Control over Public/' for theIIS AppPool<SITE_NAME>`

  • Full Control over `/' for all NET4ORCE users (andrew, adrian & martin)

The script recieves the SITE_NAME as an argument to permissions:

permissions MyWebSite-v1.09

Or via bash & ssh

cmd /c permissions MyWebSite-v1.09

Clean git for permissions

Either via the command line or windows explorer, changing these permission makes git flag all tracked files as modified.

So a git checkout . command is alsoexecuted after a permissions update

Building the dlls

The MSBUILD tool is avaliable on the servers, so I've included a build.bat command that shoudl successfully recompile the dlls.

Major / Minor changes & rev nos.

Use Major.Minor revision numbering for folder, where 1.09 is the 9th minor release of the 1st Major release. For example if a new Secion is added, minor New Data Type major.

Examples of modifications that DO NEED a version change are:

  • Removing or renaming any exposed name (function, method, type, etc)
  • Adding, removing or renaming methods in an interface
  • Changing the type of a parameter or result in an interface
  • Adding a parameter to an interface method
  • Adding a parameter to a function or method, unless it's a variadic parameter
  • Changing the type of a parameter in a function or method, unless the new type is an interface implemented by the old type, or the new type is an interface that is a subset of the old interface
  • Changing the type of a result from a function or method
  • Some changes in the number of results in a function or method (see details below)
  • Some struct changes (see details below)

On the other hand, the following modifications are FINE WITHOUT a version change:

  • Adding exposed names (function, method, type, etc)
  • Renaming a parameter or result of a function, method, or interface
  • Changing the type of a function or method parameter to an interface that is implemented by the old type, or a subset of the old interface
  • Adding a variadic parameter to a function or method
  • Some changes in the number of results in a function or method (see details below)
  • Some struct changes (see details below)

New Template

<%@ Import Namespace="Net4orce.Core.Data.Users" %>


<%/* ==============================================================
   * = Code Editor Template
   * ============================================================== */%>

<div class="navbar navbar-default navbar-fixed-top admin-navbar" role="navigation">
  <div class="navbar-header">
    <a class="navbar-brand" href="/"><%=CanvasApp.oSiteSettings.cSiteName%></a>
  </div>
  <ul class="navbar-nav nav">

    <!-- Authed Nav !-->
    <%if( oSession.IsAuthed ){%>

    <%if( oSession.oUser.HasSuperAdmin()){%>

    <li class="dropdown">

      <a class="dropdown-toggle" href="#" data-toggle="dropdown">
        <i class="glyphicon glyphicon-cog "></i> Canvas Admin
        <b class="carret"></b>
      </a>
      <ul class="dropdown-menu">

        <li class="dropdown-header">General</li>
        <li><a href="/admin/sections">Sections</a></li>
        <li><a href="/admin/templates">Templates</a></li>
        <li><a href="/admin/datasources">DataSources</a></li>
        <li><a href="/admin/users">Users</a></li>

        <%if( oSession.oUser.HasSuperAdmin()){%>
        <li><a href="/admin/dynamicassemblys">Dynamic Assemblies</a></li>
        <%}%>

        <li class="divider"></li>
        <li class="dropdown-header">Configuration</li>
        <li><a href="/admin/sitesettings">Site Settings</a></li>
        <li><a href="/admin/config">Config Bootstrap</a></li>
        <li><a href="/admin/config/less">Less / CSS</a></li>
        <li><a href="/admin/config/javascript">JavaScript</a></li>
        <li><a href="/admin/tools">Admin Tools</a></li>
        <li class="divider"></li>
        <li><a href="/admin/realtime">Realtime Overview</a></li>
        <li class="divider"></li>   

        <li><a href="/logout">Logout</a></li>
      </ul>

    </li>
    <%}%>
    <%}else{ %>

    <!-- Public Users !-->
    <li><a href="/login"><i class="glyphicon glyphicon-log-in "></i> Login</a></li>

    <%} %>

  </ul>
  <div class="navbar-nav navbar-right">

    <ul class="admin-navbar-links navbar-nav nav"></ul>
    <div class="admin-navbar-other"></div>
    <div class="admin-navbar-pull-right"></div>
    <div class="admin-navbar-links-pull-right"></div>

  </div>
</div>


<div class="code-editor" style="padding-top:51px; padding-bottom:20px;">
  <div class="row">
    <n4:canvasplaceholder 
      id="main" 
      runat="server" 
      tagname="section" 
      colspan="12">
    </n4:canvasplaceholder>
  </div>
</div>