Skip to content

Commit

Permalink
Merge pull request #72 from tianxiaoliang/master
Browse files Browse the repository at this point in the history
[SCB-1477]add release script
  • Loading branch information
WillemJiang committed Sep 5, 2019
2 parents 683ad1e + 26c4092 commit c6a5e8a
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 49 deletions.
4 changes: 2 additions & 2 deletions NOTICE
Expand Up @@ -4,8 +4,8 @@ Copyright 2018-2019, Huawei
This product includes software developed at
Huawei.

Apache ServiceComb Mersher
Copyright 2017-2019 The Apache Software Foundation
Apache ServiceComb Mesher
Copyright 2019-2019 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -59,5 +59,8 @@ it will build binary and docker image
- docker image name: servicecomb/mesher-sidecar:latest

# Documentations
# Documentations
You can see more documentations in [here](https://mesher.readthedocs.io/en/latest/),
this online doc is for latest version of mesher, if you want to see your version's doc,
follow [here](docs/README.md) to generate it in local

https://mesher.readthedocs.io/en/latest/
13 changes: 8 additions & 5 deletions build/build_proxy.sh
Expand Up @@ -41,6 +41,8 @@ GO111MODULE=on go mod vendor
go build -a github.com/apache/servicecomb-mesher/cmd/mesher

cp -r $PROJECT_DIR/licenses $release_dir
cp -r $PROJECT_DIR/licenses/LICENSE $release_dir
cp -r $PROJECT_DIR/licenses/NOTICE $release_dir
cp -r $PROJECT_DIR/conf $release_dir
cp $PROJECT_DIR/start.sh $release_dir
cp $PROJECT_DIR/mesher $release_dir
Expand All @@ -63,12 +65,13 @@ cd $release_dir

chmod +x start.sh mesher

x86_pkg_name="mesher-$VERSION-linux-amd64.tar.gz"
arm_pkg_name="mesher-$VERSION-linux-arm64.tar.gz"
component="apache-servicecomb-mesher"
x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz"
arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz"

#x86 release
tar zcvf $x86_pkg_name licenses conf mesher VERSION
tar zcvf mesher.tar.gz licenses conf mesher VERSION start.sh # for docker image
tar zcvf $x86_pkg_name licenses conf mesher VERSION LICENSE NOTICE
tar zcvf mesher.tar.gz licenses conf mesher VERSION LICENSE NOTICE start.sh # for docker image


echo "building docker..."
Expand All @@ -78,4 +81,4 @@ sudo docker build -t servicecomb/mesher-sidecar:${VERSION} .

# arm release
GOARCH=arm64 go build -a github.com/apache/servicecomb-mesher/cmd/mesher
tar zcvf $arm_pkg_name licenses conf mesher VERSION
tar zcvf $arm_pkg_name licenses conf mesher VERSION LICENSE NOTICE
39 changes: 39 additions & 0 deletions build/release.sh
@@ -0,0 +1,39 @@
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

export BUILD_DIR=$(cd "$(dirname "$0")"; pwd)
export PROJECT_DIR=$(dirname ${BUILD_DIR})

component="apache-servicecomb-mesher"
x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz"
arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz"
cd $PROJECT_DIR/release
#asc
gpg --armor --output "${x86_pkg_name}".asc --detach-sig "${x86_pkg_name}"
gpg --armor --output "${arm_pkg_name}".asc --detach-sig "${arm_pkg_name}"
#512
sha512sum "${x86_pkg_name}" > "${x86_pkg_name}".sha512
sha512sum "${arm_pkg_name}" > "${arm_pkg_name}".sha512
#src
wget "https://github.com/apache/servicecomb-mesher/archive/v${VERSION}.tar.gz"

src_name="${component}-${VERSION}-src.tar.gz"
mv "v${VERSION}.tar.gz" "${src_name}"

gpg --armor --output "$src_name.asc" --detach-sig "${src_name}"

sha512sum "${src_name}" > "${src_name}".sha512

0 comments on commit c6a5e8a

Please sign in to comment.