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
d59dbb2e
Commit
d59dbb2e
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Don't do node version checks for image installs
parent
0c8dc938
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
+20
-29
20 additions, 29 deletions
src/freedombone-utils-nodejs
with
20 additions
and
29 deletions
src/freedombone-utils-nodejs
+
20
−
29
View file @
d59dbb2e
...
...
@@ -189,36 +189,26 @@ function mesh_install_nodejs {
nodejs_fix_cpu_detection
cp
"
$rootdir
/root/npm"
"
$rootdir
/usr/bin/npm"
cp
"
$rootdir
/root/npm"
"
$rootdir
/usr/local/bin/npm"
fi
# deliberate second install of npm
$mesh_install_nodejs_prefix
npm
install
--arch
=
$NPM_ARCH
-g
npm@
${
NPM_VERSION
}
--save
if
[
-f
"
$rootdir
/root/.npm-global/lib/node_modules/npm/bin/npm"
]
;
then
cp
"
$rootdir
/root/.npm-global/lib/node_modules/npm/bin/npm"
"
$rootdir
/usr/local/bin/npm"
cp
"
$rootdir
/root/.npm-global/lib/node_modules/npm/bin/npm"
"
$rootdir
/usr/bin/npm"
fi
if
[
-f
"
$rootdir
/usr/local/bin/npm"
]
;
then
cp
"
$rootdir
/usr/local/bin/npm"
"
$rootdir
/usr/bin/npm"
fi
cp
"
$rootdir
/usr/bin/npm"
"
$rootdir
/root/npm"
# deliberate second install of node
$mesh_install_nodejs_prefix
PATH
=
"/root/.npm-global/bin:
$PATH
"
NPM_CONFIG_PREFIX
=
/root/.npm-global npm
install
--arch
=
$NPM_ARCH
-g
node@
${
NODEJS_VERSION
}
--save
if
[
-f
"
$rootdir
/root/.npm-global/lib/node_modules/node/bin/node"
]
;
then
cp
"
$rootdir
/root/.npm-global/lib/node_modules/node/bin/node"
"
$rootdir
/usr/local/bin/node"
cp
"
$rootdir
/root/.npm-global/lib/node_modules/node/bin/node"
"
$rootdir
/usr/bin/node"
fi
if
[
-f
"
$rootdir
/usr/local/bin/node"
]
;
then
cp
"
$rootdir
/usr/local/bin/node"
"
$rootdir
/usr/bin/node"
# deliberate second install of npm
$mesh_install_nodejs_prefix
npm
install
--arch
=
$NPM_ARCH
-g
npm@
${
NPM_VERSION
}
--save
if
[
-f
"
$rootdir
/root/.npm-global/lib/node_modules/npm/bin/npm"
]
;
then
cp
"
$rootdir
/root/.npm-global/lib/node_modules/npm/bin/npm"
"
$rootdir
/usr/local/bin/npm"
cp
"
$rootdir
/root/.npm-global/lib/node_modules/npm/bin/npm"
"
$rootdir
/usr/bin/npm"
fi
if
[
-f
"
$rootdir
/usr/local/bin/npm"
]
;
then
cp
"
$rootdir
/usr/local/bin/npm"
"
$rootdir
/usr/bin/npm"
fi
cp
"
$rootdir
/usr/bin/npm"
"
$rootdir
/root/npm"
fi
cp
"
$rootdir
/usr/bin/node"
"
$rootdir
/root/node"
if
[
-f
"
$rootdir
/usr/bin/node"
]
;
then
cp
"
$rootdir
/usr/bin/node"
"
$rootdir
/usr/local/bin/node"
fi
# check the version numbers
cat
<<
EOF
> "
$rootdir
/usr/bin/test_nodejs_install"
if
[
!
"
$rootdir
"
]
;
then
# 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
...
...
@@ -233,13 +223,14 @@ if [[ "\$npm_version" != "${NPM_VERSION}" ]]; then
exit 2
fi
EOF
chmod
+x
"
$rootdir
/usr/bin/test_nodejs_install"
if
!
$mesh_install_nodejs_prefix
/usr/bin/test_nodejs_install
;
then
echo
$"nodejs version numbers did not match. Architecture is
$NPM_ARCH
."
NODE_UPGRADE
=
exit
76835282
chmod
+x
"
$rootdir
/usr/bin/test_nodejs_install"
if
!
$mesh_install_nodejs_prefix
/usr/bin/test_nodejs_install
;
then
echo
$"nodejs version numbers did not match. Architecture is
$NPM_ARCH
."
NODE_UPGRADE
=
exit
76835282
fi
rm
"
$rootdir
/usr/bin/test_nodejs_install"
fi
rm
"
$rootdir
/usr/bin/test_nodejs_install"
NODE_UPGRADE
=
}
...
...
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