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

Cleanup branch param in package script #3622

Merged
merged 3 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- uses: ./.github/actions/tagname-action
id: tag
- name: package
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }} -t RelWithDebInfo -r OFF -p ON -s TRUE
run: ./package/package.sh -v ${{ steps.tag.outputs.tag }} -t RelWithDebInfo -r OFF -p ON -s TRUE
- name: output some vars
run: |
tar zcf ${{ env.CPACK_DIR }}/nebula-${{ steps.tag.outputs.tagnum }}.tar.gz --exclude=${{ env.BUILD_DIR }} ./*
Expand Down
19 changes: 7 additions & 12 deletions package/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@
# -v: The version of package, the version should be match tag name, default value is null
# -n: Package to one or multi-packages, `ON` means one package, `OFF` means multi packages, default value is `ON`
# -s: Whether to strip the package, default value is `FALSE`
# -b: Branch, default master
# -d: Whether to enable sanitizer, default OFF
# -t: Build type, default Release
# -j: Number of threads, default $(nproc)
# -r: Whether enable compressed debug info, default ON
# -p: Whether dump the symbols from binary by dump_syms
#
# usage: ./package.sh -v <version> -n <ON/OFF> -s <TRUE/FALSE> -b <BRANCH>
# usage: ./package.sh -v <version> -n <ON/OFF> -s <TRUE/FALSE>
#

set -e

version=""
package_one=ON
strip_enable="FALSE"
usage="Usage: ${0} -v <version> -n <ON/OFF> -s <TRUE/FALSE> -b <BRANCH> -g <ON/OFF> -j <jobs> -t <BUILD TYPE>"
usage="Usage: ${0} -v <version> -n <ON/OFF> -s <TRUE/FALSE> -g <ON/OFF> -j <jobs> -t <BUILD TYPE>"
project_dir="$(cd "$(dirname "$0")" && pwd)/.."
build_dir=${project_dir}/pkg-build
enablesanitizer="OFF"
static_sanitizer="OFF"
build_type="Release"
branch="master"
branch=$(git rev-parse --abbrev-ref HEAD)
jobs=$(nproc)
enable_compressed_debug_info=ON
dump_symbols=OFF
Expand All @@ -47,9 +46,6 @@ do
s)
strip_enable=$OPTARG
;;
b)
branch=$OPTARG
;;
d)
enablesanitizer="ON"
if [ "$OPTARG" == "static" ]; then
Expand Down Expand Up @@ -135,9 +131,8 @@ function build {
san=$2
ssan=$3
build_type=$4
branch=$5
package_tar=$6
install_prefix=$7
package_tar=$5
install_prefix=$6

mkdir -p ${build_dir}

Expand Down Expand Up @@ -210,13 +205,13 @@ function dump_syms {
}

# The main
build $version $enablesanitizer $static_sanitizer $build_type $branch "OFF" "/usr/local/nebula"
build $version $enablesanitizer $static_sanitizer $build_type "OFF" "/usr/local/nebula"
package $strip_enable
if [[ $dump_symbols == ON ]]; then
echo ">>> start dump symbols <<<"
dump_syms
fi

# tar package
build $version $enablesanitizer $static_sanitizer $build_type $branch "ON" "/"
build $version $enablesanitizer $static_sanitizer $build_type "ON" "/"
package $strip_enable