Skip to content

Commit 8a1f683

Browse files
committed
updated release scripts
1 parent cea1100 commit 8a1f683

10 files changed

Lines changed: 562 additions & 589 deletions

release/bundle-linux.sh

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,76 +21,76 @@ CUSTOMER_TOOL="CustomerSupportTool"
2121
VERSION="1.1.2"
2222

2323
MAKESELF="makeself"
24-
DIR=$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd )
25-
TARGET_DIR="$DIR/target"
24+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
25+
TARGET_DIR="${DIR}/target"
2626
FOUND="0"
2727
set -e
2828

29-
if [[ -d "$TARGET_DIR/Staff/linux-x86" ]]; then
30-
FOUND="1"
31-
echo ""
32-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
33-
printf "\e[1m\e[92m Creating $STAFF_TOOL-$VERSION.linux-x86.sh...\e[0m\n"
34-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
35-
echo ""
36-
rm -f "$TARGET_DIR/$STAFF_TOOL-$VERSION.linux-x86.sh"
37-
cd "$TARGET_DIR/Staff/linux-x86"
38-
"$MAKESELF" --tar-quietly \
39-
. \
40-
"$TARGET_DIR/$STAFF_TOOL-$VERSION.linux-x86.sh" \
41-
"$STAFF_TOOL $VERSION" \
42-
bin/Start.sh
29+
if [[ -d "${TARGET_DIR}/Staff/linux-x86" ]]; then
30+
FOUND="1"
31+
echo ""
32+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
33+
printf "\e[1m\e[92m Creating %s.linux-x86.sh...\e[0m\n" "${STAFF_TOOL}-${VERSION}"
34+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
35+
echo ""
36+
rm -f "${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.linux-x86.sh"
37+
cd "${TARGET_DIR}/Staff/linux-x86"
38+
"$MAKESELF" --tar-quietly \
39+
. \
40+
"${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.linux-x86.sh" \
41+
"${STAFF_TOOL} ${VERSION}" \
42+
bin/Start.sh
4343
fi
4444

45-
if [[ -d "$TARGET_DIR/Staff/linux-x86-64" ]]; then
46-
FOUND="1"
47-
echo ""
48-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
49-
printf "\e[1m\e[92m Creating $STAFF_TOOL-$VERSION.linux-x86-64.sh...\e[0m\n"
50-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
51-
echo ""
52-
rm -f "$TARGET_DIR/$STAFF_TOOL-$VERSION.linux-x86-64.sh"
53-
cd "$TARGET_DIR/Staff/linux-x86-64"
54-
"$MAKESELF" --tar-quietly \
55-
. \
56-
"$TARGET_DIR/$STAFF_TOOL-$VERSION.linux-x86-64.sh" \
57-
"$STAFF_TOOL $VERSION" \
58-
bin/Start.sh
45+
if [[ -d "${TARGET_DIR}/Staff/linux-x86-64" ]]; then
46+
FOUND="1"
47+
echo ""
48+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
49+
printf "\e[1m\e[92m Creating %s.linux-x86-64.sh...\e[0m\n" "${STAFF_TOOL}-${VERSION}"
50+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
51+
echo ""
52+
rm -f "${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.linux-x86-64.sh"
53+
cd "${TARGET_DIR}/Staff/linux-x86-64"
54+
"$MAKESELF" --tar-quietly \
55+
. \
56+
"${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.linux-x86-64.sh" \
57+
"${STAFF_TOOL} ${VERSION}" \
58+
bin/Start.sh
5959
fi
6060

61-
if [[ -d "$TARGET_DIR/Customer/linux-x86" ]]; then
62-
FOUND="1"
63-
echo ""
64-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
65-
printf "\e[1m\e[92m Creating $CUSTOMER_TOOL-$VERSION.linux-x86.sh...\e[0m\n"
66-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
67-
echo ""
68-
rm -f "$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.linux-x86.sh"
69-
cd "$TARGET_DIR/Customer/linux-x86"
70-
"$MAKESELF" --tar-quietly \
71-
. \
72-
"$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.linux-x86.sh" \
73-
"$CUSTOMER_TOOL $VERSION" \
74-
bin/Start.sh
61+
if [[ -d "${TARGET_DIR}/Customer/linux-x86" ]]; then
62+
FOUND="1"
63+
echo ""
64+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
65+
printf "\e[1m\e[92m Creating %s.linux-x86.sh...\e[0m\n" "${CUSTOMER_TOOL}-${VERSION}"
66+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
67+
echo ""
68+
rm -f "${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.linux-x86.sh"
69+
cd "${TARGET_DIR}/Customer/linux-x86"
70+
"$MAKESELF" --tar-quietly \
71+
. \
72+
"${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.linux-x86.sh" \
73+
"${CUSTOMER_TOOL} ${VERSION}" \
74+
bin/Start.sh
7575
fi
7676

77-
if [[ -d "$TARGET_DIR/Customer/linux-x86-64" ]]; then
78-
FOUND="1"
79-
echo ""
80-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
81-
printf "\e[1m\e[92m Creating $CUSTOMER_TOOL-$VERSION.linux-x86-64.sh...\e[0m\n"
82-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
83-
echo ""
84-
rm -f "$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.linux-x86-64.sh"
85-
cd "$TARGET_DIR/Customer/linux-x86-64"
86-
"$MAKESELF" --tar-quietly \
87-
. \
88-
"$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.linux-x86-64.sh" \
89-
"$CUSTOMER_TOOL $VERSION" \
90-
bin/Start.sh
77+
if [[ -d "${TARGET_DIR}/Customer/linux-x86-64" ]]; then
78+
FOUND="1"
79+
echo ""
80+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
81+
printf "\e[1m\e[92m Creating %s.linux-x86-64.sh...\e[0m\n" "${CUSTOMER_TOOL}-${VERSION}"
82+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
83+
echo ""
84+
rm -f "${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.linux-x86-64.sh"
85+
cd "${TARGET_DIR}/Customer/linux-x86-64"
86+
"$MAKESELF" --tar-quietly \
87+
. \
88+
"${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.linux-x86-64.sh" \
89+
"${CUSTOMER_TOOL} ${VERSION}" \
90+
bin/Start.sh
9191
fi
9292

93-
if [[ "$FOUND" == "0" ]]; then
94-
echo "ERROR: No Linux packages were found at:"
95-
echo "$TARGET_DIR"
93+
if [[ "${FOUND}" == "0" ]]; then
94+
echo "ERROR: No Linux packages were found at:"
95+
echo "${TARGET_DIR}"
9696
fi

release/bundle-macos.sh

Lines changed: 75 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -21,90 +21,90 @@ CUSTOMER_TOOL="CustomerSupportTool"
2121
VERSION="1.1.2"
2222

2323
MAKESELF="makeself"
24-
DIR=$( cd $( dirname ${BASH_SOURCE[0]} ) && pwd )
25-
TARGET_DIR="$DIR/target"
24+
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
25+
TARGET_DIR="${DIR}/target"
2626
FOUND="0"
2727
set -e
2828

29-
if [[ -d "$TARGET_DIR/Staff/macos-x86-64" ]]; then
30-
FOUND="1"
31-
echo ""
32-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
33-
printf "\e[1m\e[92m Creating $STAFF_TOOL-$VERSION.macos-x86-64.tar.gz...\e[0m\n"
34-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
35-
echo ""
36-
rm -Rf "$TARGET_DIR/$STAFF_TOOL.app"
37-
rm -f "$TARGET_DIR/$STAFF_TOOL-$VERSION.macos-x86-64.tar.gz"
38-
cp -R "$DIR/src/macos/Staff.app" "$TARGET_DIR/$STAFF_TOOL.app"
39-
mkdir -p "$TARGET_DIR/$STAFF_TOOL.app/Contents"
40-
mkdir -p "$TARGET_DIR/$STAFF_TOOL.app/Contents/MacOS"
41-
cp "$DIR/src/macos/JavaMacLauncher" "$TARGET_DIR/$STAFF_TOOL.app/Contents/MacOS/JavaMacLauncher"
42-
chmod ugo+x "$TARGET_DIR/$STAFF_TOOL.app/Contents/MacOS/JavaMacLauncher"
43-
cp -R "$TARGET_DIR/Staff/macos-x86-64" "$TARGET_DIR/$STAFF_TOOL.app/Contents/Resources"
44-
sed -i -e "s/{VERSION}/$VERSION/g" "$TARGET_DIR/$STAFF_TOOL.app/Contents/Info.plist"
45-
cd "$TARGET_DIR"
46-
tar cfz "$STAFF_TOOL-$VERSION.macos-x86-64.tar.gz" "$STAFF_TOOL.app"
47-
rm -Rf "$TARGET_DIR/$STAFF_TOOL.app"
48-
echo "Unsigned archive was created at:"
49-
echo "target/$STAFF_TOOL-$VERSION.macos-x86-64.tar.gz"
29+
if [[ -d "${TARGET_DIR}/Staff/macos-x86-64" ]]; then
30+
FOUND="1"
31+
echo ""
32+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
33+
printf "\e[1m\e[92m Creating %s.macos-x86-64.tar.gz...\e[0m\n" "${STAFF_TOOL}-${VERSION}"
34+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
35+
echo ""
36+
rm -Rf "${TARGET_DIR}/${STAFF_TOOL}.app"
37+
rm -f "${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.macos-x86-64.tar.gz"
38+
cp -R "${DIR}/src/macos/Staff.app" "${TARGET_DIR}/${STAFF_TOOL}.app"
39+
mkdir -p "${TARGET_DIR}/${STAFF_TOOL}.app/Contents"
40+
mkdir -p "${TARGET_DIR}/${STAFF_TOOL}.app/Contents/MacOS"
41+
cp "${DIR}/src/macos/JavaMacLauncher" "${TARGET_DIR}/${STAFF_TOOL}.app/Contents/MacOS/JavaMacLauncher"
42+
chmod ugo+x "${TARGET_DIR}/${STAFF_TOOL}.app/Contents/MacOS/JavaMacLauncher"
43+
cp -R "${TARGET_DIR}/Staff/macos-x86-64" "${TARGET_DIR}/${STAFF_TOOL}.app/Contents/Resources"
44+
sed -i -e "s/{VERSION}/${VERSION}/g" "${TARGET_DIR}/${STAFF_TOOL}.app/Contents/Info.plist"
45+
cd "${TARGET_DIR}"
46+
tar cfz "${STAFF_TOOL}-${VERSION}.macos-x86-64.tar.gz" "${STAFF_TOOL}.app"
47+
rm -Rf "${TARGET_DIR}/${STAFF_TOOL}.app"
48+
echo "Unsigned archive was created at:"
49+
echo "target/${STAFF_TOOL}-${VERSION}.macos-x86-64.tar.gz"
5050
fi
5151

52-
if [[ -d "$TARGET_DIR/Customer/macos-x86-64" ]]; then
53-
FOUND="1"
54-
echo ""
55-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
56-
printf "\e[1m\e[92m Creating $CUSTOMER_TOOL-$VERSION.macos-x86-64.tar.gz...\e[0m\n"
57-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
58-
echo ""
59-
rm -Rf "$TARGET_DIR/$CUSTOMER_TOOL.app"
60-
rm -f "$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.macos-x86-64.tar.gz"
61-
cp -R "$DIR/src/macos/Customer.app" "$TARGET_DIR/$CUSTOMER_TOOL.app"
62-
mkdir -p "$TARGET_DIR/$CUSTOMER_TOOL.app/Contents"
63-
mkdir -p "$TARGET_DIR/$CUSTOMER_TOOL.app/Contents/MacOS"
64-
cp "$DIR/src/macos/JavaMacLauncher" "$TARGET_DIR/$CUSTOMER_TOOL.app/Contents/MacOS/JavaMacLauncher"
65-
chmod ugo+x "$TARGET_DIR/$CUSTOMER_TOOL.app/Contents/MacOS/JavaMacLauncher"
66-
cp -R "$TARGET_DIR/Customer/macos-x86-64" "$TARGET_DIR/$CUSTOMER_TOOL.app/Contents/Resources"
67-
sed -i -e "s/{VERSION}/$VERSION/g" "$TARGET_DIR/$CUSTOMER_TOOL.app/Contents/Info.plist"
68-
cd "$TARGET_DIR"
69-
tar cfz "$CUSTOMER_TOOL-$VERSION.macos-x86-64.tar.gz" "$CUSTOMER_TOOL.app"
70-
rm -Rf "$TARGET_DIR/$CUSTOMER_TOOL.app"
71-
echo "Unsigned archive was created at:"
72-
echo "target/$CUSTOMER_TOOL-$VERSION.macos-x86-64.tar.gz"
52+
if [[ -d "${TARGET_DIR}/Customer/macos-x86-64" ]]; then
53+
FOUND="1"
54+
echo ""
55+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
56+
printf "\e[1m\e[92m Creating %s.macos-x86-64.tar.gz...\e[0m\n" "${CUSTOMER_TOOL}-${VERSION}"
57+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
58+
echo ""
59+
rm -Rf "${TARGET_DIR}/${CUSTOMER_TOOL}.app"
60+
rm -f "${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.macos-x86-64.tar.gz"
61+
cp -R "${DIR}/src/macos/Customer.app" "${TARGET_DIR}/${CUSTOMER_TOOL}.app"
62+
mkdir -p "${TARGET_DIR}/${CUSTOMER_TOOL}.app/Contents"
63+
mkdir -p "${TARGET_DIR}/${CUSTOMER_TOOL}.app/Contents/MacOS"
64+
cp "${DIR}/src/macos/JavaMacLauncher" "${TARGET_DIR}/${CUSTOMER_TOOL}.app/Contents/MacOS/JavaMacLauncher"
65+
chmod ugo+x "${TARGET_DIR}/${CUSTOMER_TOOL}.app/Contents/MacOS/JavaMacLauncher"
66+
cp -R "${TARGET_DIR}/Customer/macos-x86-64" "${TARGET_DIR}/${CUSTOMER_TOOL}.app/Contents/Resources"
67+
sed -i -e "s/{VERSION}/${VERSION}/g" "${TARGET_DIR}/${CUSTOMER_TOOL}.app/Contents/Info.plist"
68+
cd "${TARGET_DIR}"
69+
tar cfz "${CUSTOMER_TOOL}-${VERSION}.macos-x86-64.tar.gz" "${CUSTOMER_TOOL}.app"
70+
rm -Rf "${TARGET_DIR}/${CUSTOMER_TOOL}.app"
71+
echo "Unsigned archive was created at:"
72+
echo "target/${CUSTOMER_TOOL}-${VERSION}.macos-x86-64.tar.gz"
7373
fi
7474

75-
if [[ -d "$TARGET_DIR/Staff/macos-x86-64" ]]; then
76-
FOUND="1"
77-
echo ""
78-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
79-
printf "\e[1m\e[92m Creating $STAFF_TOOL-$VERSION.macos-x86-64.sh...\e[0m\n"
80-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
81-
echo ""
82-
rm -f "$TARGET_DIR/$STAFF_TOOL-$VERSION.macos-x86-64.sh"
83-
cd "$TARGET_DIR/Staff/macos-x86-64"
84-
"$MAKESELF" --tar-quietly \
85-
. \
86-
"$TARGET_DIR/$STAFF_TOOL-$VERSION.macos-x86-64.sh" \
87-
"$STAFF_TOOL $VERSION" \
88-
bin/Start.sh
75+
if [[ -d "${TARGET_DIR}/Staff/macos-x86-64" ]]; then
76+
FOUND="1"
77+
echo ""
78+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
79+
printf "\e[1m\e[92m Creating %s.macos-x86-64.sh...\e[0m\n" "${STAFF_TOOL}-${VERSION}"
80+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
81+
echo ""
82+
rm -f "${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.macos-x86-64.sh"
83+
cd "${TARGET_DIR}/Staff/macos-x86-64"
84+
"$MAKESELF" --tar-quietly \
85+
. \
86+
"${TARGET_DIR}/${STAFF_TOOL}-${VERSION}.macos-x86-64.sh" \
87+
"${STAFF_TOOL} ${VERSION}" \
88+
bin/Start.sh
8989
fi
9090

91-
if [[ -d "$TARGET_DIR/Customer/macos-x86-64" ]]; then
92-
FOUND="1"
93-
echo ""
94-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
95-
printf "\e[1m\e[92m Creating $CUSTOMER_TOOL-$VERSION.macos-x86-64.sh...\e[0m\n"
96-
printf "\e[1m\e[92m=======================================================================\e[0m\n"
97-
echo ""
98-
rm -f "$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.macos-x86-64.sh"
99-
cd "$TARGET_DIR/Customer/macos-x86-64"
100-
"$MAKESELF" --tar-quietly \
101-
. \
102-
"$TARGET_DIR/$CUSTOMER_TOOL-$VERSION.macos-x86-64.sh" \
103-
"$CUSTOMER_TOOL $VERSION" \
104-
bin/Start.sh
91+
if [[ -d "${TARGET_DIR}/Customer/macos-x86-64" ]]; then
92+
FOUND="1"
93+
echo ""
94+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
95+
printf "\e[1m\e[92m Creating %s.macos-x86-64.sh...\e[0m\n" "${CUSTOMER_TOOL}-${VERSION}"
96+
printf "\e[1m\e[92m=======================================================================\e[0m\n"
97+
echo ""
98+
rm -f "${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.macos-x86-64.sh"
99+
cd "${TARGET_DIR}/Customer/macos-x86-64"
100+
"$MAKESELF" --tar-quietly \
101+
. \
102+
"${TARGET_DIR}/${CUSTOMER_TOOL}-${VERSION}.macos-x86-64.sh" \
103+
"${CUSTOMER_TOOL} ${VERSION}" \
104+
bin/Start.sh
105105
fi
106106

107-
if [[ "$FOUND" == "0" ]]; then
108-
echo "ERROR: No macOS packages were found at:"
109-
echo "$TARGET_DIR"
107+
if [[ "${FOUND}" == "0" ]]; then
108+
echo "ERROR: No macOS packages were found at:"
109+
echo "${TARGET_DIR}"
110110
fi

0 commit comments

Comments
 (0)