Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163517
D7493.id27176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7493.id27176.diff
View Options
diff --git a/docker/services/swh-web/entrypoint.sh b/docker/services/swh-web/entrypoint.sh
--- a/docker/services/swh-web/entrypoint.sh
+++ b/docker/services/swh-web/entrypoint.sh
@@ -5,16 +5,6 @@
source /srv/softwareheritage/utils/pgsql.sh
setup_pgsql
-# when overriding swh-web sources only
-if [[ -d /src/swh-web ]] ; then
- echo "Install and compile swh-web static assets"
- pushd /src/swh-web
- yarn install --frozen-lockfile
- # execute webpack-dev-server in background
- yarn start-dev&
- popd
-fi
-
source /srv/softwareheritage/utils/pyutils.sh
setup_pip
diff --git a/docker/utils/pyutils.sh b/docker/utils/pyutils.sh
--- a/docker/utils/pyutils.sh
+++ b/docker/utils/pyutils.sh
@@ -1,6 +1,5 @@
#!/bin/bash
-
setup_pip () {
echo Using pip from $(which pip)
@@ -8,19 +7,24 @@
tmpdir=`mktemp -d`
pushd /src
for srcrepo in swh-* ; do
- if [ -w $srcrepo ]
- then
- # Install package in editable mode if source directory is writable
- pip install -e $srcrepo
- else
+ if [ ! -w $srcrepo ]; then
# Source directories might not be writeable, but building them writes
# in-tree; so we're copying them to a location guaranteed to be writeable.
rsync -a --chmod=+w $srcrepo $tmpdir/ --exclude "*/__pycache__/" --exclude "*/.tox/" --exclude "*/.hypothesis/"
- pip install $tmpdir/$srcrepo
- fi
+ pushd $tmpdir/$srcrepo
+ else
+ pushd $srcrepo
+ fi
+ if [ -f package.json ]; then
+ yarn install --frozen-lockfile
+ # execute webpack-dev-server in background
+ yarn start-dev&
+ fi
+ # Install package in editable mode if source directory is writable
+ pip install -e .
+ popd
done
popd
- rm -rf $tmpdir
fi
echo Installed Python packages:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 9:45 AM (19 h, 11 m ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3230250
Attached To
D7493: docker: make yarn run in the local copy of the swh-web source code
Event Timeline
Log In to Comment