mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
Merge pull request #44 from clems4ever/fix-package-json
npm install breaks because it does not find entrypoint file.
This commit is contained in:
commit
8201ab7d1f
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -29,3 +29,5 @@ notifications/
|
|||
dist/
|
||||
|
||||
.nyc_output/
|
||||
|
||||
*.tgz
|
||||
|
|
0
.npmignore
Normal file
0
.npmignore
Normal file
|
@ -24,8 +24,9 @@ script:
|
|||
- docker-compose build
|
||||
- docker-compose up -d
|
||||
- sleep 5
|
||||
- ./scripts/check_services.sh
|
||||
- ./scripts/check-services.sh
|
||||
- npm run int-test
|
||||
- ./scripts/npm-deployment-test.sh
|
||||
|
||||
after_success:
|
||||
- ./scripts/docker-publish.sh
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"name": "authelia",
|
||||
"version": "3.0.0",
|
||||
"description": "2FA Single Sign-On server for nginx using LDAP, TOTP and U2F",
|
||||
"main": "src/index.js",
|
||||
"main": "dist/src/server/index.js",
|
||||
"bin": {
|
||||
"authelia": "src/index.js"
|
||||
"authelia": "dist/src/server/index.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/mocha --compilers ts:ts-node/register --recursive test/client test/server",
|
||||
|
|
39
scripts/npm-deployment-test.sh
Executable file
39
scripts/npm-deployment-test.sh
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
NPM_UNPACK_DIR=/tmp/npm-unpack
|
||||
|
||||
echo "--- Packing npm package into a tarball"
|
||||
npm pack
|
||||
|
||||
AUTHELIA_PACKAGE=`ls | grep "authelia-\([0-9]\+.\)\{2\}[0-9]\+.tgz"`
|
||||
echo "--- Authelia package is ${AUTHELIA_PACKAGE}"
|
||||
|
||||
echo "--- Copy package into "${NPM_UNPACK_DIR}" to test unpacking"
|
||||
mkdir -p ${NPM_UNPACK_DIR}
|
||||
cp ${AUTHELIA_PACKAGE} ${NPM_UNPACK_DIR}
|
||||
|
||||
pushd ${NPM_UNPACK_DIR}
|
||||
|
||||
echo "--- Test unpacking..."
|
||||
npm install ${AUTHELIA_PACKAGE}
|
||||
|
||||
RET_CODE_INSTALL=$?
|
||||
# echo ${RET_CODE}
|
||||
|
||||
# The binary must start and display the help menu
|
||||
./node_modules/.bin/authelia | grep "No config file has been provided."
|
||||
RET_CODE_RUN=$?
|
||||
|
||||
popd
|
||||
|
||||
if [ "$RET_CODE_INSTALL" != "0" ] || [ "$RET_CODE_RUN" != "0" ]
|
||||
then
|
||||
echo "--- Unpacking failed..."
|
||||
exit 1
|
||||
else
|
||||
echo "+++ Unpacking succeeded"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user