mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 10:52:33 +08:00
docs(changelog): add CHANGELOG-3.5.0+2.e0bd54f-1-g4ce6a0fa6.md
This commit is contained in:
parent
4ce6a0fa67
commit
dc9be13888
0
CHANGELOG/CHANGELOG-3.5.0+2.e0bd54f-1-g4ce6a0fa6.md
Normal file
0
CHANGELOG/CHANGELOG-3.5.0+2.e0bd54f-1-g4ce6a0fa6.md
Normal file
@ -120,7 +120,7 @@ function openim::release::package_tarballs() {
|
|||||||
openim::util::wait-for-jobs || { openim::log::error "previous tarball phase failed"; return 1; }
|
openim::util::wait-for-jobs || { openim::log::error "previous tarball phase failed"; return 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
function openim::release::updload_tarballs() {
|
function openim::release::upload_tarballs() {
|
||||||
openim::log::info "upload ${RELEASE_TARS}/* to cos bucket ${BUCKET}."
|
openim::log::info "upload ${RELEASE_TARS}/* to cos bucket ${BUCKET}."
|
||||||
for file in $(ls ${RELEASE_TARS}/*)
|
for file in $(ls ${RELEASE_TARS}/*)
|
||||||
do
|
do
|
||||||
@ -202,7 +202,6 @@ function openim::release::package_server_tarballs() {
|
|||||||
openim::release::create_tarball "${package_name}" "${release_stage}/.."
|
openim::release::create_tarball "${package_name}" "${release_stage}/.."
|
||||||
) &
|
) &
|
||||||
done
|
done
|
||||||
echo "++++++++++++++++++++++++++package_server_tarballs++++++++++++++++++++++++++++"
|
|
||||||
openim::log::status "Waiting on tarballs"
|
openim::log::status "Waiting on tarballs"
|
||||||
openim::util::wait-for-jobs || { openim::log::error "server tarball creation failed"; exit 1; }
|
openim::util::wait-for-jobs || { openim::log::error "server tarball creation failed"; exit 1; }
|
||||||
}
|
}
|
||||||
@ -644,8 +643,10 @@ function openim::release::generate_changelog() {
|
|||||||
set +o errexit
|
set +o errexit
|
||||||
git add "${OPENIM_ROOT}"/CHANGELOG/CHANGELOG-${OPENIM_GIT_VERSION#v}.md
|
git add "${OPENIM_ROOT}"/CHANGELOG/CHANGELOG-${OPENIM_GIT_VERSION#v}.md
|
||||||
git commit -a -m "docs(changelog): add CHANGELOG-${OPENIM_GIT_VERSION#v}.md"
|
git commit -a -m "docs(changelog): add CHANGELOG-${OPENIM_GIT_VERSION#v}.md"
|
||||||
echo "##################################################"
|
echo ""
|
||||||
|
echo "##########################################################################"
|
||||||
echo "git commit -a -m \"docs(changelog): add CHANGELOG-${OPENIM_GIT_VERSION#v}.md\""
|
echo "git commit -a -m \"docs(changelog): add CHANGELOG-${OPENIM_GIT_VERSION#v}.md\""
|
||||||
openim::log::info "You need git push CHANGELOG-${OPENIM_GIT_VERSION#v}.md to remote"
|
openim::log::info "You need git push CHANGELOG-${OPENIM_GIT_VERSION#v}.md to remote"
|
||||||
echo "##################################################"
|
echo "##########################################################################"
|
||||||
|
echo ""
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,27 +13,138 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Description:
|
||||||
|
# This script automates the process of building and releasing OpenIM,
|
||||||
|
# including tasks like setting up the environment, verifying prerequisites,
|
||||||
|
# building commands, packaging tarballs, uploading tarballs, creating GitHub
|
||||||
|
# releases, and generating changelogs.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# ./scripts/release.sh [options]
|
||||||
|
# Options include:
|
||||||
|
# -h, --help : Show help message
|
||||||
|
# -se, --setup-env : Execute setup environment
|
||||||
|
# -vp, --verify-prereqs : Execute prerequisites verification
|
||||||
|
# -bc, --build-command : Execute build command
|
||||||
|
# -bi, --build-image : Execute build image (default: not executed)
|
||||||
|
# -pt, --package-tarballs : Execute package tarballs
|
||||||
|
# -ut, --upload-tarballs : Execute upload tarballs
|
||||||
|
# -gr, --github-release : Execute GitHub release
|
||||||
|
# -gc, --generate-changelog: Execute generate changelog
|
||||||
|
#
|
||||||
|
# This script can also be executed via the 'make release' command as an alternative.
|
||||||
|
#
|
||||||
|
# Dependencies:
|
||||||
|
# This script depends on external scripts found in the 'scripts' directory and
|
||||||
|
# assumes the presence of necessary tools and permissions for building and
|
||||||
|
# releasing software.
|
||||||
|
#
|
||||||
|
# Note:
|
||||||
|
# The script uses standard bash script practices with error handling,
|
||||||
|
# and it defaults to executing all steps if no specific option is provided.
|
||||||
|
#
|
||||||
# Build a OpenIM release. This will build the binaries, create the Docker
|
# Build a OpenIM release. This will build the binaries, create the Docker
|
||||||
# images and other build artifacts.
|
# images and other build artifacts.
|
||||||
|
# Build a OpenIM release. This script supports various flags for flexible execution control.
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${OPENIM_ROOT}/scripts/common.sh"
|
source "${OPENIM_ROOT}/scripts/common.sh"
|
||||||
source "${OPENIM_ROOT}/scripts/lib/release.sh"
|
source "${OPENIM_ROOT}/scripts/lib/release.sh"
|
||||||
|
|
||||||
OPENIM_RELEASE_RUN_TESTS=${OPENIM_RELEASE_RUN_TESTS-y}
|
OPENIM_RELEASE_RUN_TESTS=${OPENIM_RELEASE_RUN_TESTS-y}
|
||||||
|
|
||||||
openim::golang::setup_env
|
# Function to show help message
|
||||||
openim::build::verify_prereqs
|
show_help() {
|
||||||
openim::release::verify_prereqs
|
echo "Usage: $(basename $0) [options]"
|
||||||
# openim::build::build_image
|
echo "Options:"
|
||||||
openim::build::build_command
|
echo " -h, --help Show this help message"
|
||||||
openim::release::package_tarballs
|
echo " -se, --setup-env Execute setup environment"
|
||||||
openim::release::updload_tarballs
|
echo " -vp, --verify-prereqs Execute prerequisites verification"
|
||||||
# git push origin ${VERSION}
|
echo " -bc, --build-command Execute build command"
|
||||||
# openim::release::github_release
|
echo " -bi, --build-image Execute build image (default: not executed)"
|
||||||
openim::release::generate_changelog
|
echo " -pt, --package-tarballs Execute package tarballs"
|
||||||
|
echo " -ut, --upload-tarballs Execute upload tarballs"
|
||||||
|
echo " -gr, --github-release Execute GitHub release"
|
||||||
|
echo " -gc, --generate-changelog Execute generate changelog"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Initialize all actions to false
|
||||||
|
perform_setup_env=false
|
||||||
|
perform_verify_prereqs=false
|
||||||
|
perform_build_command=false
|
||||||
|
perform_build_image=false # New flag for build image
|
||||||
|
perform_package_tarballs=false
|
||||||
|
perform_upload_tarballs=false
|
||||||
|
perform_github_release=false
|
||||||
|
perform_generate_changelog=false
|
||||||
|
|
||||||
|
# Process command-line arguments
|
||||||
|
while getopts "hsevpbciptutgrgc-" opt; do
|
||||||
|
case "${opt}" in
|
||||||
|
h) show_help; exit 0 ;;
|
||||||
|
se) perform_setup_env=true ;;
|
||||||
|
vp) perform_verify_prereqs=true ;;
|
||||||
|
bc) perform_build_command=true ;;
|
||||||
|
bi) perform_build_image=true ;; # Handling new option
|
||||||
|
pt) perform_package_tarballs=true ;;
|
||||||
|
ut) perform_upload_tarballs=true ;;
|
||||||
|
gr) perform_github_release=true ;;
|
||||||
|
gc) perform_generate_changelog=true ;;
|
||||||
|
--) case "${OPTARG}" in
|
||||||
|
help) show_help; exit 0 ;;
|
||||||
|
setup-env) perform_setup_env=true ;;
|
||||||
|
verify-prereqs) perform_verify_prereqs=true ;;
|
||||||
|
build-command) perform_build_command=true ;;
|
||||||
|
build-image) perform_build_image=true ;; # Handling new long option
|
||||||
|
package-tarballs) perform_package_tarballs=true ;;
|
||||||
|
upload-tarballs) perform_upload_tarballs=true ;;
|
||||||
|
github-release) perform_github_release=true ;;
|
||||||
|
generate-changelog) perform_generate_changelog=true ;;
|
||||||
|
*) echo "Invalid option: --${OPTARG}"; show_help; exit 1 ;;
|
||||||
|
esac ;;
|
||||||
|
*) show_help; exit 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Enable all actions by default if no options are provided
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
perform_setup_env=true
|
||||||
|
perform_verify_prereqs=true
|
||||||
|
perform_build_command=true
|
||||||
|
perform_package_tarballs=true
|
||||||
|
perform_upload_tarballs=true
|
||||||
|
perform_github_release=true
|
||||||
|
perform_generate_changelog=true
|
||||||
|
# TODO: Not enabling build_image by default
|
||||||
|
# perform_build_image=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Function to perform actions
|
||||||
|
perform_action() {
|
||||||
|
local flag=$1
|
||||||
|
local message=$2
|
||||||
|
local command=$3
|
||||||
|
|
||||||
|
if [ "$flag" == true ]; then
|
||||||
|
openim::log::info "## $message..."
|
||||||
|
if ! $command; then
|
||||||
|
openim::log::errexit "Error in $message"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "Starting script execution..."
|
||||||
|
|
||||||
|
perform_action $perform_setup_env "Setting up environment" "openim::golang::setup_env"
|
||||||
|
perform_action $perform_verify_prereqs "Verifying prerequisites" "openim::build::verify_prereqs && openim::release::verify_prereqs"
|
||||||
|
perform_action $perform_build_command "Executing build command" "openim::build::build_command"
|
||||||
|
perform_action $perform_build_image "Building image" "openim::build::build_image"
|
||||||
|
perform_action $perform_package_tarballs "Packaging tarballs" "openim::release::package_tarballs"
|
||||||
|
perform_action $perform_upload_tarballs "Uploading tarballs" "openim::release::upload_tarballs"
|
||||||
|
perform_action $perform_github_release "Creating GitHub release" "openim::release::github_release"
|
||||||
|
perform_action $perform_generate_changelog "Generating changelog" "openim::release::generate_changelog"
|
||||||
|
|
||||||
|
openim::log::success "OpenIM Relase Script Execution Completed."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user