forked from ppc64le/build-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurl-loader_ubi_8.5.sh
51 lines (45 loc) · 1.98 KB
/
url-loader_ubi_8.5.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : url-loader
# Version : v0.6.2
# Source repo : https://github.com/webpack-contrib/url-loader
# Tested on : RHEL 8.5,UBI 8.5
# Language : Node
# Travis-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Vathsala . <[email protected]>
#
# Disclaimer : This script has been tested in root mode on given
# ========== platform using the mentioned version of the package.
# It may not work as expected with newer versions of the
# package and/or distribution. In such case, please
# contact "Maintainer" of this script.
#
# ----------------------------------------------------------------------------
PACKAGE_NAME=url-loader
#PACKAGE_VERSION is configurable can be passed as an argument.
PACKAGE_VERSION=${1:-v0.6.2}
PACKAGE_URL=https://github.com/webpack-contrib/url-loader.git
yum install -y yum-utils git jq
NODE_VERSION=v12.22.4
#installing nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm install $NODE_VERSION
OS_NAME=$(cat /etc/os-release | grep ^PRETTY_NAME | cut -d= -f2)
if ! git clone -q $PACKAGE_URL $PACKAGE_NAME; then
echo "------------------$PACKAGE_NAME:clone_fails---------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Clone_Fails"
exit 1
fi
#Tests not available
cd $PACKAGE_NAME
git checkout "$PACKAGE_VERSION" || exit 1
if ! npm install && npm audit fix && npm audit fix --force; then
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | $OS_NAME | GitHub | Fail | Install_Fails"
exit 1
fi