mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-27 07:54:09 +01:00
Added build package script
This commit is contained in:
parent
2df4ce991a
commit
67d3981694
3 changed files with 45 additions and 0 deletions
|
@ -22,3 +22,4 @@ script:
|
||||||
- .travis/frontend-build.sh
|
- .travis/frontend-build.sh
|
||||||
- .travis/backend-lint.sh
|
- .travis/backend-lint.sh
|
||||||
- .travis/backend-test.sh
|
- .travis/backend-test.sh
|
||||||
|
- .travis/build-package.sh
|
||||||
|
|
12
.travis/build-package.sh
Executable file
12
.travis/build-package.sh
Executable file
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
if test $TRAVIS_TAG
|
||||||
|
then
|
||||||
|
utils/make-package.sh pdnsmanager-$TRAVIS_TAG
|
||||||
|
else
|
||||||
|
utils/make-package.sh pdnsmanager-$TRAVIS_COMMIT
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
32
utils/make-package.sh
Executable file
32
utils/make-package.sh
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
mkdir "$1"
|
||||||
|
|
||||||
|
# Copy backend
|
||||||
|
rsync -a backend/src/ "$1"/backend
|
||||||
|
rm -f "$1"/backend/config/ConfigUser.php
|
||||||
|
|
||||||
|
# Copy frontend
|
||||||
|
cd frontend/
|
||||||
|
npm run build --prod
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
rsync -a frontend/dist/ "$1"/frontend
|
||||||
|
|
||||||
|
cd frontend/
|
||||||
|
rm -rf dist/
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Copy additional files
|
||||||
|
cp LICENSE "$1"
|
||||||
|
cp README.md "$1"
|
||||||
|
|
||||||
|
# Create archive
|
||||||
|
tar -czf "$1".tar.gz "$1"
|
||||||
|
|
||||||
|
# Remove temp data
|
||||||
|
rm -rf "$1"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue