1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15-
15+ set -eo
1616
1717# USAGE:
1818# ./scripts/archive.sh <artifact path> <release version>
3131# Linux archive is generated directorily from original binary,
3232# the script will check if `bin/slack` for Linux exits or not first
3333
34-
3534DIST_DIR=${1}
3635
3736main () {
@@ -82,21 +81,21 @@ main() {
8281 tar -zxvf " $macos_dev_targz_file_path " -C " $mac_targz_dir_path "
8382
8483 if [ $( command -v " $mac_targz_dir_path /bin/slack" ) ]; then
85- echo " -> Found bin/slack"
86- rm -R " $mac_targz_dir_path "
84+ echo " -> Found bin/slack"
85+ rm -R " $mac_targz_dir_path "
8786 else
88- echo " -> Missing development bin/slack"
87+ echo " -> Missing development bin/slack"
8988 fi
9089
9190 echo " -> Testing macOs production tar.gz file..."
9291 mkdir " $mac_targz_dir_path "
9392 tar -zxvf " $macos_prod_targz_file_path " -C " $mac_targz_dir_path "
9493
9594 if [ $( command -v " $mac_targz_dir_path /bin/slack" ) ]; then
96- echo " -> Found bin/slack"
97- rm -R " $mac_targz_dir_path "
95+ echo " -> Found bin/slack"
96+ rm -R " $mac_targz_dir_path "
9897 else
99- echo " -> Missing production bin/slack"
98+ echo " -> Missing production bin/slack"
10099 fi
101100
102101 echo " -> Everything looks good!"
@@ -109,10 +108,10 @@ main() {
109108 linux_prod_targz_file_path=" $DIST_DIR /slack_cli_latest_linux_64-bit.tar.gz"
110109
111110 if [ -f " $linux_src_file_path " ]; then
112- echo " -> Found linux binary archive"
111+ echo " -> Found linux binary archive"
113112 else
114- echo " -> Missing linux binary archive"
115- exit
113+ echo " -> Missing linux binary archive"
114+ exit
116115 fi
117116
118117 echo " -> Creating development Linux tar.gz file: $linux_dev_targz_file_path "
0 commit comments