-# -# Copyright 2015 North Development AB -# -# Author: Gerard Hickey -# -# Licensed under the Apache License, Version 2.0 (the “License”); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an “AS IS” BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License.

/ TODO Need better formatting / TODO Better error notification %h3 Upload Puppet Module

%div.section.site-width#content

Specify below the location of the Puppet module .tar.gz file that you wish to publish.

The Puppet module .tar.gz file should be generated by executing

%div.code-block
  %pre
    puppet module build

The result will be a pkg directory at the top level of the module with the .tag.gz within it.
Once the .tar.gz has been generated, it can be uploaded to this Puppet Forge server through the
form below or by executing the following curl command line.

%div.code-block
  %pre
    :markdown
      curl -F "file=@pkg/_<name>_-_<version>_.tar.gz" #{request.env['REQUEST_URI']}

%span.search_error
  -if upload_status
    -case upload_status
    -when '200'
      File has been uploaded
    -when ''
    -else
      Upload has failed. #{upload_status}

%form{:action => '/upload', :method=>'post', :enctype=>'multipart/form-data' }
  %input{ :type => 'file', :name=>'file'}
  %input{ :type=>'submit', :value=>'Upload'}