Sha256: b183ce27c6c99a204e474e7e742ccf96fd4b79fb1b254d038c4155ddd9ed5450

Contents?: true

Size: 1.79 KB

Versions: 8

Compression:

Stored size: 1.79 KB

Contents

#!/usr/local/ruby-current/bin/ruby
# Copyright:: Copyright (c) 2014 eGlobalTech, Inc., all rights reserved
#
# Licensed under the BSD-3 license (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the root of the project or at
#
#     http://egt-labs.com/mu/LICENSE.html
#
# 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.

if ARGV.size > 0
  puts "#{$0}: Freshen the Mu Master's API and configuration documentation"
  exit 1
end

require 'rubygems'
require 'bundler/setup'
require 'json'
require 'erb'
require 'optimist'
require 'json-schema'
require File.realpath(File.expand_path(File.dirname(__FILE__)+"/mu-load-config.rb"))
require 'mu'

ENV['PATH'] += ":"+File.dirname(Gem.ruby)

begin
  MU.log "Looking up the system YARD"
  yard = `which yard 2>&1`.chomp

  if yard.include? "no yard in"
    MU.log "No system YARD found. Trying YARD gem"
    yard = File.dirname(Gem.ruby)+'/yard'
  end

rescue
  MU.log "Using the YARD gem"
  yard = File.dirname(Gem.ruby)+'/yard'
end



MU::Config.emitSchemaAsRuby
MU.log "Generating YARD documentation in /var/www/html/docs (see http://#{$MU_CFG['public_address']}/docs/frames.html)"

File.umask 0022

Dir.chdir(MU.myRoot) do
  #exec "env -i PATH=#{ENV['PATH']} HOME=#{ENV['HOME']} #{yard} doc modules -m markdown -o /var/www/html/docs" THIS DOESNT WORK IN CICD

  system(%Q{#{yard} doc modules -m markdown -o /var/www/html/docs})

  system(%Q{chcon -R -h -t httpd_sys_script_exec_t /var/www/html/})

  system(%Q{#{yard} stats --list-undoc modules})
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cloud-mu-2.0.4 bin/mu-gen-docs
cloud-mu-2.1.0beta bin/mu-gen-docs
cloud-mu-2.0.3 bin/mu-gen-docs
cloud-mu-2.0.2 bin/mu-gen-docs
cloud-mu-2.0.1 bin/mu-gen-docs
cloud-mu-2.0.0.pre.beta3 bin/mu-gen-docs
cloud-mu-2.0.0.pre.beta2 bin/mu-gen-docs
cloud-mu-2.0.0.pre.beta1 bin/mu-gen-docs