Menu

[03a9b8]: / Utilities / Release_As_Repository.command  Maximize  Restore  History

Download this file

70 lines (56 with data), 2.1 kB

#!/bin/zsh
########################################################### {{{1 ###########
#   Copyright © 2005 … 2023 Martin Krischik
############################################################################
#   This program is free software; you can redistribute it and/or
#   modify it under the terms of the GNU General Public License
#   as published by the Free Software Foundation; either version 2
#   of the License, or (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
########################################################### }}}1 ###########

source ${0:h}/Setup.command

setopt No_XTrace
setopt No_Verbose
setopt SH_Word_Split
setopt Err_Exit
setopt CSH_Null_Glob
setopt Extended_Glob

if test -z "${1}"; then
    echo "
Usage:

    Release_As_Repository module

Example:

    Release_As_Repository wikibook
"
else
    in_Module="${1}"

    pushd "${PROJECT_HOME}/${in_Module#*_}"
	Index="${Krischik_Index}/${I:0:2}/${in_Module}"

	if ! test -d "${Index}"; then
	    mkdir -p "${Index}"
	fi

	alr --force publish

	pushd "alire/releases"
	    gcp --verbose --update --target-directory="${Index}"		    ${I}-*-dev.toml
	    gcp --verbose --update --target-directory="${SourceForce_Local}/Alire"  ${I}-*-dev.toml
	popd

	pushd "${Index}"
	    git add ${in_Module}-*-dev.toml
	    git commit --message="New ${I} dev release"
	popd

	alr index --update-all
	Files_Upload.command
    popd
fi

########################################################### {{{1 ###########
# vim: set textwidth=0 nowrap tabstop=8 shiftwidth=4 softtabstop=4 expandtab :
# vim: set filetype=zsh fileencoding=utf-8 fileformat=unix foldmethod=marker :
# vim: set nospell spelllang=en_gb :
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.