Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen from tag #44

Merged
merged 3 commits into from
Jul 19, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 38 additions & 32 deletions makedoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,42 @@ cd $(dirname "$0");
STORAGE_DIR="modulesource"

#=== FUNCTION ==================================================================
# NAME: checkout
# DESCRIPTION: Checks out a specific branch of a module into a folder. Not
# particular good for taking up space, but at the moment separate
# folders for each version we need will do.
# NAME: checkout
# DESCRIPTION: Checks out a specific branch of a module into a folder. Not
# particular good for taking up space, but at the moment separate
# folders for each version we need will do.
#
# The master branch will checked out by default
# The master branch will checked out by default
# PARAMETERS:
# $1 - module path on github (e.g silverstripe/silverstripe-framework.git)
# $2 - branch name (e.g 3.0)
# $3 - module name (e.g framework)
# $1 - module path on github (e.g silverstripe/silverstripe-framework.git)
# $2 - branch/tag name (e.g 3.0), if $4 is defined this references the tag
# $3 - module name (e.g framework)
# $4 - whether we should use a branch for the clone
#
#===============================================================================
function checkout {
if [ -d "$STORAGE_DIR"/$2/$3/.git ]; then
(cd "$STORAGE_DIR"/$2/$3 && git reset --hard HEAD && git pull)
else
git clone --depth=100 --branch=$2 $1 "$STORAGE_DIR"/$2/$3
fi
if [ -z $4 ]; then
VERSION_DIR=$2
else
VERSION_DIR=$(echo $2 | cut -c1-3)
fi
if [ -d "$STORAGE_DIR"/$2/$3/.git ]; then
(cd "$STORAGE_DIR"/$2/$3 && git reset --hard HEAD && git pull)
else
git clone --depth=100 --branch=$2 $1 "$STORAGE_DIR"/"$VERSION_DIR"/$3
fi
}

#=== FUNCTION ================================================================
# NAME: generate
# DESCRIPTION: Generates APIGEN documentation
# NAME: generate
# DESCRIPTION: Generates APIGEN documentation
# PARAMETERS:
# $1 - branch name (e.g. 3.0)
# $2 - Title (e.g. "SilverStripe master API Docs")
# $1 - branch name (e.g. 3.0)
# $2 - Title (e.g. "SilverStripe master API Docs")
#
#===============================================================================
function generate {
vendor/bin/apigen generate --config conf/apigen/apigen.neon --source "$STORAGE_DIR"/$1 --destination en/$1 --title "$2"
vendor/bin/apigen generate --config conf/apigen/apigen.neon --source "$STORAGE_DIR"/$1 --destination htdocs/$1 --title "$2"
}

# Ensure storage directory exists
Expand Down Expand Up @@ -71,29 +77,29 @@ checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.5' 'reports
generate '3.5' 'SilverStripe 3.5 API Docs'

# 3.4
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.4' 'cms'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.4' 'framework'
checkout 'git://github.com/silverstripe/silverstripe-siteconfig.git' '3.4' 'siteconfig'
checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.4' 'reports'
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.4.1' 'cms' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.4.1' 'framework' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-siteconfig.git' '3.4.1' 'siteconfig' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.4.1' 'reports' 'tag'
generate '3.4' 'SilverStripe 3.4 API Docs'

# 3.3
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.3' 'cms'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.3' 'framework'
checkout 'git://github.com/silverstripe/silverstripe-siteconfig.git' '3.3' 'siteconfig'
checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.3' 'reports'
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.3.1' 'cms' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.3.1' 'framework' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-siteconfig.git' '3.3.1' 'siteconfig' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.3.1' 'reports' 'tag'
generate '3.3' 'SilverStripe 3.3 API Docs'

# 3.2
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.2' 'cms'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.2' 'framework'
checkout 'git://github.com/silverstripe/silverstripe-siteconfig.git' '3.2' 'siteconfig'
checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.2' 'reports'
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.2.1' 'cms' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.2.1' 'framework' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-siteconfig.git' '3.2.1' 'siteconfig' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-reports.git' '3.2.1' 'reports' 'tag'
generate '3.2' 'SilverStripe 3.2 API Docs'

# 3.1
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.1' 'cms'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.1' 'framework'
checkout 'git://github.com/silverstripe/silverstripe-cms.git' '3.1.1' 'cms' 'tag'
checkout 'git://github.com/silverstripe/silverstripe-framework.git' '3.1.1' 'framework' 'tag'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the following tags please?

  • 3.4.6
  • 3.3.4
  • 3.2.6
  • 3.1.21

generate '3.1' 'SilverStripe 3.1 API Docs'

# 3.0
Expand Down