Skip to content

Commit c6a5e8a

Browse files
authored
Merge pull request #72 from tianxiaoliang/master
[SCB-1477]add release script
2 parents 683ad1e + 26c4092 commit c6a5e8a

File tree

6 files changed

+94
-49
lines changed

6 files changed

+94
-49
lines changed

NOTICE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Copyright 2018-2019, Huawei
44
This product includes software developed at
55
Huawei.
66

7-
Apache ServiceComb Mersher
8-
Copyright 2017-2019 The Apache Software Foundation
7+
Apache ServiceComb Mesher
8+
Copyright 2019-2019 The Apache Software Foundation
99

1010
This product includes software developed at
1111
The Apache Software Foundation (http://www.apache.org/).

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,8 @@ it will build binary and docker image
5959
- docker image name: servicecomb/mesher-sidecar:latest
6060

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

63-
https://mesher.readthedocs.io/en/latest/

build/build_proxy.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ GO111MODULE=on go mod vendor
4141
go build -a github.com/apache/servicecomb-mesher/cmd/mesher
4242

4343
cp -r $PROJECT_DIR/licenses $release_dir
44+
cp -r $PROJECT_DIR/licenses/LICENSE $release_dir
45+
cp -r $PROJECT_DIR/licenses/NOTICE $release_dir
4446
cp -r $PROJECT_DIR/conf $release_dir
4547
cp $PROJECT_DIR/start.sh $release_dir
4648
cp $PROJECT_DIR/mesher $release_dir
@@ -63,12 +65,13 @@ cd $release_dir
6365

6466
chmod +x start.sh mesher
6567

66-
x86_pkg_name="mesher-$VERSION-linux-amd64.tar.gz"
67-
arm_pkg_name="mesher-$VERSION-linux-arm64.tar.gz"
68+
component="apache-servicecomb-mesher"
69+
x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz"
70+
arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz"
6871

6972
#x86 release
70-
tar zcvf $x86_pkg_name licenses conf mesher VERSION
71-
tar zcvf mesher.tar.gz licenses conf mesher VERSION start.sh # for docker image
73+
tar zcvf $x86_pkg_name licenses conf mesher VERSION LICENSE NOTICE
74+
tar zcvf mesher.tar.gz licenses conf mesher VERSION LICENSE NOTICE start.sh # for docker image
7275

7376

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

7982
# arm release
8083
GOARCH=arm64 go build -a github.com/apache/servicecomb-mesher/cmd/mesher
81-
tar zcvf $arm_pkg_name licenses conf mesher VERSION
84+
tar zcvf $arm_pkg_name licenses conf mesher VERSION LICENSE NOTICE

build/release.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/usr/bin/env bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
export BUILD_DIR=$(cd "$(dirname "$0")"; pwd)
19+
export PROJECT_DIR=$(dirname ${BUILD_DIR})
20+
21+
component="apache-servicecomb-mesher"
22+
x86_pkg_name="$component-$VERSION-linux-amd64.tar.gz"
23+
arm_pkg_name="$component-$VERSION-linux-arm64.tar.gz"
24+
cd $PROJECT_DIR/release
25+
#asc
26+
gpg --armor --output "${x86_pkg_name}".asc --detach-sig "${x86_pkg_name}"
27+
gpg --armor --output "${arm_pkg_name}".asc --detach-sig "${arm_pkg_name}"
28+
#512
29+
sha512sum "${x86_pkg_name}" > "${x86_pkg_name}".sha512
30+
sha512sum "${arm_pkg_name}" > "${arm_pkg_name}".sha512
31+
#src
32+
wget "https://github.com/apache/servicecomb-mesher/archive/v${VERSION}.tar.gz"
33+
34+
src_name="${component}-${VERSION}-src.tar.gz"
35+
mv "v${VERSION}.tar.gz" "${src_name}"
36+
37+
gpg --armor --output "$src_name.asc" --detach-sig "${src_name}"
38+
39+
sha512sum "${src_name}" > "${src_name}".sha512

0 commit comments

Comments
 (0)