#!/bin/bash
# dev/package/wizard - Package Development Wizards

set -e

lib_load 'dev/package/publish'

######
# Package Publishing Wizard

# package_wizard_publish() - Automates the entire package publishing process.
# $1 - Package version
#
# This wizard performs the following individual steps:
package_wizard_publish() {
	has_args 1 "$@"
	local version=$1

	#   - Publishes package distribution files
	package_publish_tarballs "$version"

	#   - Publishes package documentation
	package_publish_docs "$version"

	#   - Publishes package installers
	package_publish_installers "$version"

	#   - If the Publishes updated links to the new version
	package_publish_links "$version"

	#   - Publishes package installers
	package_publish_announce "$version"
}


######
# Package Release Wizard

# package_wizard_release() - Automates the entire package release process
# for the given type of release ($1).
#
# This wizard performs the following individual steps:
package_wizard_release() {
	has_args 1 "$@"
	local release_type=$1

	#   - Pulls changes from the remote repository.
	git_update

	#   - Removes the existing development installation.  For this
	#     reason, we **strongly recommend** using a virgin clone of the
	#     repository that has been dedicated to the release process.
	run rm -rf $package_repodir/install

	#   - Bootstraps the package to produce the local ``install/`` tree.
	run $package_repodir/bootstrap.sh

	#   - Removes all build artifacts except the ``install/`` tree.
	make_run dist-clean

	#   - Modifies the ``system.i7`` file to enable `release` mode.
	local var='RELEASE_TYPE'
	run sed -i -e "s,^$var=debug,$var=release," "${system_i7}"
	RELEASE_TYPE=release

	#   - Builds the release files, tags the repo, and bumps the version.
	package_release "$release_type"

	#   - Publishes all of the pieces for the release to their
	#     appropriate locations and updates the release branch links.
	#     See ``package_wizard_publish()``.
	package_wizard_publish "$VERSION"
}

View the Developer Guide Index

View the Reference Manual Index


Generated on Thu May 4 18:59:54 PDT 2017 by mcsh i7 v0.19.0.