Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
1f702d19
Commit
1f702d19
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Test nodejs version numbers
parent
4a04d291
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-utils-nodejs
+22
-0
22 additions, 0 deletions
src/freedombone-utils-nodejs
with
22 additions
and
0 deletions
src/freedombone-utils-nodejs
+
22
−
0
View file @
1f702d19
...
...
@@ -127,6 +127,28 @@ function mesh_install_nodejs {
$mesh_install_nodejs_prefix
npm
install
--arch
=
$NPM_ARCH
-g
n@
${
NODEJS_N_VERSION
}
--save
$mesh_install_nodejs_prefix
n
--arch
$N_ARCH
${
NODEJS_VERSION
}
cp
$rootdir
/root/npm
$rootdir
/usr/bin/npm
# check the version numbers
cat
<<
EOF
>
$rootdir
/usr/bin/test_nodejs_install
#!/bin/bash
node_version=
\$
(node -v)
if [[ "
\$
node_version" != "v
${
NODEJS_VERSION
}
" ]]; then
echo
$"
nodejs version expected to be
${
NODEJS_VERSION
}
but found
\$
node_version"
exit 1
fi
npm_version=
\$
(npm -v)
if [[ "
\$
npm_version" != "v
${
NPM_VERSION
}
" ]]; then
echo
$"
npm version expected to be
${
NPM_VERSION
}
but found
\$
npm_version"
exit 2
fi
EOF
chmod
+x
$rootdir
/usr/bin/test_nodejs_install
chroot
"
$rootdir
"
/usr/bin/test_nodejs_install
if
[
!
"
$?
"
=
"0"
]
;
then
echo
$"nodejs version numbers did not match. Architecture is
$NPM_ARCH
."
exit
76835282
fi
rm
$rootdir
/usr/bin/test_nodejs_install
}
function
remove_nodejs
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment