11cb0ef41Sopenharmony_ci#!/bin/bash 21cb0ef41Sopenharmony_ci# Copyright 2020 the V8 project authors. All rights reserved. 31cb0ef41Sopenharmony_ci# Use of this source code is governed by a BSD-style license that can be 41cb0ef41Sopenharmony_ci# found in the LICENSE file. 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciOS="linux" 91cb0ef41Sopenharmony_ciOS_LABEL="Linux" 101cb0ef41Sopenharmony_ciSUFFIX="" 111cb0ef41Sopenharmony_ciif [[ -n "$1" && $1 == "win" ]]; then 121cb0ef41Sopenharmony_ci OS="win" 131cb0ef41Sopenharmony_ci OS_LABEL="Windows" 141cb0ef41Sopenharmony_ci SUFFIX=".exe" 151cb0ef41Sopenharmony_cielif [[ -n "$1" && $1 == "macos" ]]; then 161cb0ef41Sopenharmony_ci OS="macos" 171cb0ef41Sopenharmony_ci OS_LABEL="MacOS" 181cb0ef41Sopenharmony_cifi 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_ciecho "Building and packaging for $OS_LABEL..." 211cb0ef41Sopenharmony_ci(set -x; $DIR/node_modules/.bin/pkg -t node10-$OS-x64 $DIR) 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_cirm -rf $DIR/output > /dev/null 2>&1 || true 241cb0ef41Sopenharmony_cirm $DIR/output.zip > /dev/null 2>&1 || true 251cb0ef41Sopenharmony_ci 261cb0ef41Sopenharmony_cimkdir $DIR/output 271cb0ef41Sopenharmony_cicd $DIR/output 281cb0ef41Sopenharmony_ciln -s ../db db 291cb0ef41Sopenharmony_ciln -s ../ochang_js_fuzzer$SUFFIX run$SUFFIX 301cb0ef41Sopenharmony_ciln -s ../foozzie_launcher.py foozzie_launcher.py 311cb0ef41Sopenharmony_ciecho "Creating $DIR/output.zip" 321cb0ef41Sopenharmony_ci(set -x; zip -r $DIR/output.zip * > /dev/null) 33