#!/bin/bash
# dev/package/publish - package release publishing

set -e

lib_load 'dev/package/install'


######
# Package publishing

package_publish_git_remote() {
	has_args 1 "$@"
	local branch=$1
	local git_push_tags=true
	git_push "$branch"
}

package_publish_ssh() {
	local src=$1
	local dst=$2

	local host=$PUBLISH_SSH_HOST
	local path=$PUBLISH_SSH_PATH
	if [ -z "$host" -o -z "$path" ]; then
		warn "ssh transport: host/path not definied, skipping $dst..."
		return
	fi

	run_rsync -a "$src" "$host:$path/$dst"
}

package_publish_tarballs() {
	local version=${1:-$(package_version_build_full)}

	local dirname
	dirname=$(package_dist_dirname '' "$version")

	app_echo "publishing v$version release tarballs..."
	package_publish_ssh "$package_distdir/$dirname" releases
}

package_publish_docs() {
	local version=${1:-$(package_version_build_full)}

	local dirname
	dirname=$(package_dist_dirname docs "$version")

	app_echo "publishing v$version documentation..."
	package_publish_ssh "$package_objdir/$dirname" docs
}

package_publish_announce() { error "unimplemented"; }

View the Script Reference Index


Generated on Tue Apr 25 21:20:41 PDT 2017 by mcsh i7 v0.18.0.