forked from api7/apisix-build-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-apisix-dashboard.sh
executable file
·34 lines (30 loc) · 1.02 KB
/
package-apisix-dashboard.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -euo pipefail
set -x
mkdir /output
dist=$(cat /tmp/dist)
# Determine the name of artifact
# The defaut is apisix-dashboard
artifact="apisix-dashboard"
if [ "$ARTIFACT" != "0" ]
then
artifact=${ARTIFACT}
fi
fpm -f -s dir -t "$PACKAGE_TYPE" \
--"$PACKAGE_TYPE"-dist "$dist" \
-n "$artifact" \
-a "$(uname -i)" \
-v "$PACKAGE_VERSION" \
--iteration "$ITERATION" \
--description 'Apache APISIX Dashboard is designed to make it as easy as possible for users to operate Apache APISIX through a frontend interface.' \
--license "ASL 2.0" \
-C /tmp/build/output/apisix/dashboard/ \
-p /output/ \
--url 'https://github.com/apache/apisix-dashboard' \
--config-files usr/lib/systemd/system/apisix-dashboard.service \
--config-files usr/local/apisix/dashboard/conf/conf.yaml
# Rename deb file with adding $DIST section
if [ "$PACKAGE_TYPE" == "deb" ]
then
mv /output/apisix-dashboard_"${PACKAGE_VERSION}"-"${ITERATION}"_amd64.deb /output/apisix-dashboard_"${PACKAGE_VERSION}"-"${ITERATION}"~"${dist}"_amd64.deb
fi