Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Commit b06326d

Browse files
committed
Update release script
1 parent 08c8571 commit b06326d

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

readme_bridge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Alternatively, you can [build](#building) the binary yourself.
2323

2424
## Config
2525

26-
The `config.toml` file must be present in a working directory. Config file should contain following values:
26+
The `config_bridge.toml` file must be present in a working directory. Config file should contain following values:
2727

2828
* `port` - server listening port
2929
* `api_key` - when set, all requests to bridge server must contain `api_key` parameter with a correct value, otherwise the server will respond with `503 Forbidden`
@@ -57,7 +57,7 @@ It will start a server with a single endpoint: `/payment`.
5757

5858
## Getting started
5959

60-
After creating `config.toml` file, you need to run DB migrations:
60+
After creating `config_bridge.toml` file, you need to run DB migrations:
6161
```
6262
./bridge --migrate-db
6363
```

readme_compliance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Alternatively, you can [build](#building) the binary yourself.
1414

1515
## Config
1616

17-
The `config.toml` file must be present in a working directory. Config file should contain following values:
17+
The `config_compliance.toml` file must be present in a working directory. Config file should contain following values:
1818

1919
* `external_port` - external server listening port (should be accessible from public)
2020
* `internal_port` - internal server listening port (should be accessible from your internal network only!)
@@ -38,7 +38,7 @@ Check [`config-example.toml`](./config-example.toml).
3838

3939
## Getting started
4040

41-
After creating `config.toml` file, you need to run DB migrations:
41+
After creating `config_compliance.toml` file, you need to run DB migrations:
4242
```
4343
./compliance --migrate-db
4444
```

scripts/build_artifacts.bash

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ GOARCH=amd64
77
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
88

99
build() {
10-
GOOS=$1
11-
RELEASE="bridge-$VERSION-$GOOS-$GOARCH"
10+
NAME=$1
11+
GOOS=$2
12+
RELEASE="$NAME-$VERSION-$GOOS-$GOARCH"
1213
PKG_DIR="$DIST/$RELEASE"
1314

1415
# do the actual build
@@ -17,11 +18,11 @@ build() {
1718
# make package directory
1819
rm -rf $PKG_DIR
1920
mkdir -p $PKG_DIR
20-
cp bin/$(srcBin $GOOS) $PKG_DIR/$(destBin $GOOS)
21+
cp bin/$(srcBin $NAME $GOOS) $PKG_DIR/$(destBin $NAME $GOOS)
2122
cp CHANGELOG.md $PKG_DIR/
2223
cp LICENSE.txt $PKG_DIR/
2324
cp config-example.toml $PKG_DIR/
24-
cp README.md $PKG_DIR/
25+
cp readme_$NAME.md $PKG_DIR/
2526

2627
# TODO: add platform specific install intstructions
2728

@@ -30,8 +31,9 @@ build() {
3031
}
3132

3233
srcBin() {
33-
GOOS=$1
34-
BIN="bridge-$GOOS-$GOARCH"
34+
NAME=$1
35+
GOOS=$2
36+
BIN="$NAME-$GOOS-$GOARCH"
3537

3638
if [ "$GOOS" = "windows" ]; then
3739
BIN+=".exe"
@@ -41,10 +43,10 @@ srcBin() {
4143
}
4244

4345
destBin() {
44-
if [ "$1" = "windows" ]; then
45-
echo "bridge.exe"
46+
if [ "$2" = "windows" ]; then
47+
echo "$NAME.exe"
4648
else
47-
echo "bridge"
49+
echo "$NAME"
4850
fi
4951
}
5052

@@ -63,6 +65,10 @@ pkg() {
6365
rm -rf $DIST/$RELEASE
6466
}
6567

66-
build darwin
67-
build linux
68-
build windows
68+
build bridge darwin
69+
build bridge linux
70+
build bridge windows
71+
72+
build compliance darwin
73+
build compliance linux
74+
build compliance windows

0 commit comments

Comments
 (0)