mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 03:32:49 +08:00
3f683dd6ee
* Replace gulp with webpack and npm scripts for JS compilation * Set up Travis CI to commit compiled JS * Restructure `js` directory; only one instance of npm, forum/admin are "submodules" * Refactor JS initializers into Application subclasses * Maintain partial compatibility API (importing from absolute paths) for extensions * Remove minification responsibility from PHP asset compiler * Restructure `less` directory
33 lines
639 B
Bash
Executable File
33 lines
639 B
Bash
Executable File
#!/bin/bash
|
|
|
|
main() {
|
|
while getopts ":k:i:" opt; do
|
|
case $opt in
|
|
k) encrypted_key="$OPTARG"
|
|
;;
|
|
i) encrypted_iv="$OPTARG"
|
|
;;
|
|
\?) echo "Invalid option -$OPTARG" >&2
|
|
;;
|
|
esac
|
|
done
|
|
|
|
cd js
|
|
npm i -g npm@6.1.0
|
|
npm ci
|
|
npm run build
|
|
|
|
git add dist/* -f
|
|
git commit -m "Bundled output for commit $TRAVIS_COMMIT [skip ci]"
|
|
|
|
eval `ssh-agent -s`
|
|
openssl aes-256-cbc -K $encrypted_key -iv $encrypted_iv -in ../.deploy.enc -d | ssh-add -
|
|
|
|
git config user.name "flarum-bot"
|
|
git config user.email "bot@flarum.org"
|
|
|
|
git push git@github.com:$TRAVIS_REPO_SLUG.git $TRAVIS_BRANCH
|
|
}
|
|
|
|
main "$@"
|