Revert "Restructuring for new way of installing libreevent"

This reverts commit 688b0616cc.
This commit is contained in:
2024-08-26 11:21:52 +02:00
parent 688b0616cc
commit a68e42c4bb
223 changed files with 58 additions and 11 deletions

View File

@@ -34,7 +34,7 @@ echo "
sleep 0.5
cd src/web/webapp/setup
cd src/webapp/setup
npm i
npm audit fix
@@ -68,12 +68,39 @@ echo "
sleep 1
cd ../../
cd ../../server
node prepareDB.js
sleep 1
rm -rf ./node_modules
echo "
==> Collecting files to archive <==
"
sleep 1
cd ../../
rm -rf dist/
mkdir dist/
cd dist
shopt -s extglob
cp -r ../src/server/!(node_modules) .
rm webapp
mkdir webapp
mkdir webapp/main
mkdir webapp/setup
cp -rv ../src/webapp/main/dist ./webapp/main/dist
cp -rv ../src/webapp/setup/dist ./webapp/setup/dist
rm .gitignore
rm prepareDB.js
rm test.js
rm config/*.secret.json
rm backend/plugins/payments/*/*.secret.json
echo "agdhgasjlgagaldusaglueagelwadgl" >> setupkey.txt
@@ -88,7 +115,7 @@ echo "
sleep 1
cd ..
zip -9r libreevent-$v-prebuilt.zip web
zip -9r libreevent-$v-prebuilt.zip dist
echo "
@@ -99,7 +126,7 @@ echo "
sleep 1
cd src/web
cd src/server
npm i
npm audit fix
@@ -107,7 +134,7 @@ npm audit fix
sleep 1
cd ../../
zip -9r libreevent-$v-npm.zip src/web/node_modules
zip -9r libreevent-$v-npm.zip src/server/node_modules
echo "
@@ -118,13 +145,13 @@ echo "
sleep 1
cd src/web
cd src/server
npm i full-icu
cd ../../
zip -9r libreevent-$v-full-icu.zip src/web/package.json src/web/package-lock.json
zip -9r libreevent-$v-full-icu.zip src/server/package.json src/server/package-lock.json
cd src/web
cd src/server
npm uninstall full-icu
cd ../../
@@ -150,6 +177,5 @@ echo "
Next steps:
- Check that everything was packaged correctly
- Create a release on GitHub
- Publish to npm
"

View File

@@ -1,2 +1,3 @@
# ignore node_modules folder for eslint
node_modules
webapp

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 698 KiB

After

Width:  |  Height:  |  Size: 698 KiB

View File

Before

Width:  |  Height:  |  Size: 698 KiB

After

Width:  |  Height:  |  Size: 698 KiB

19
src/server/test.js Normal file
View File

@@ -0,0 +1,19 @@
const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
let result = '';
// https://stackoverflow.com/questions/36129721/convert-number-to-alphabet-letter
function printToLetter( number ) {
let charIndex = number % alphabet.length;
let quotient = number / alphabet.length;
if ( charIndex - 1 === -1 ) {
charIndex = alphabet.length;
quotient --;
}
result = alphabet.charAt( charIndex - 1 ) + result;
if ( quotient >= 1 ) {
printToLetter( parseInt( quotient ) );
}
}
printToLetter( 150036 );
console.log( result );

Some files were not shown because too many files have changed in this diff Show More