Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency:Added build_Script,build_info for d3-selection #3102

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions d/d3-selection/build_info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"package_name":"d3-selection",
"github_url":"https://github.com/d3/d3-selection",
"package_dir":"d/d3-selection/",
"version":"v3.0.0",
"default_branch":"main",
"build_script":"d3-selection_v3.0.0_UBI_8.5.sh",
"use_non_root_user":false,
"docker_build":false
}
59 changes: 59 additions & 0 deletions d/d3-selection/d3-selection_v3.0.0_UBI_8.5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : d3-selection
# Version : v3.0.0
# Source repo : https://github.com/d3/d3-selection
# Tested on : UBI 8.5
# Language : Node
# Travis-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Shubham Garud <[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=d3-selection
PACKAGE_VERSION=${1:-v3.0.0}
PACKAGE_URL=https://github.com/d3/d3-selection

export NODE_VERSION=${NODE_VERSION:-16}

# Install dependencies
yum install -y python38 python38-devel git gcc gcc-c++ libffi make

#Installing nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source "$HOME"/.bashrc
echo "installing nodejs $NODE_VERSION"
nvm install "$NODE_VERSION" >/dev/null
nvm use $NODE_VERSION


git clone $PACKAGE_URL
cd $PACKAGE_NAME
git checkout $PACKAGE_VERSION

if !( npm install && npm audit fix --force ); then
echo "------------------$PACKAGE_NAME:install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
fi

if ! npm test; then
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi