Skip to content

Commit

Permalink
build-all.sh: Use empty config
Browse files Browse the repository at this point in the history
Could be implemented as an option, but newer config files won't work with older versions anyway, so this makes sense for now.
  • Loading branch information
stefandesu committed Jan 17, 2024
1 parent 9b3f663 commit 722b514
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ cp build/build-info.js temp/build-info.js
# Move node_modules to temporary directory so that we can restore it afterwards
mv node_modules temp/

# Move cocoda.json to temporary directory to be restored afterwards
mv config/cocoda.json temp/

# Stash changes before running script
git stash push -u -m before-build-all

Expand Down Expand Up @@ -55,6 +58,10 @@ function cleanup {
rm -r ./node_modules
mv temp/node_modules ./

# Restore previous config
rm config/cocoda.json
mv temp/cocoda.json config/

rm -r temp

if [ "$1" != "0" ]; then
Expand Down Expand Up @@ -96,6 +103,8 @@ do
# TODO: This doesn't seem to work for version 1.4.0 +/- (probably because the value is expected); we can't use "^1.0 || ^2.0" there either because it wasn't supported at that time...
packageJson="$(jq '."jskos-api"=""' package.json)"
echo -E "${packageJson}" > package.json
# Use empty config file
echo "{}" >> config/cocoda.json
# Create build
# Note: The timeout is a temporary workaround for some environments where the build succeeds, but does not exit
timeout 3m npm run build
Expand Down

0 comments on commit 722b514

Please sign in to comment.