Build and package

This commit is contained in:
Tyler 2017-12-03 20:57:24 -05:00
parent 183542178b
commit e81b1758ac
5 changed files with 47 additions and 0 deletions

28
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,28 @@
before_script:
- export VERSION=1.0.0
- chmod +x packaging/build-package.sh packaging/package-upload.sh
stages:
- build
- package
build:
image: node:latest
script:
- npm install
- npm run build
artifacts:
paths:
- dist
package:
stage: package
only:
- master
image: tystuyfzand/fpm
script:
- packaging/build-package.sh
- packaging/package-upload.sh
artifacts:
paths:
- build

View File

@ -13,6 +13,7 @@
"bootstrap": "^4.0.0-beta.2",
"bootstrap-vue": "^1.3.0",
"event-emitter": "^0.3.5",
"jquery": "^3.2.1",
"tiny-emitter": "^2.0.2",
"util.inherits": "^1.0.3",
"vue": "^2.4.2",

7
packaging/arm.conf Normal file
View File

@ -0,0 +1,7 @@
server {
root /var/www/arm-web;
location / {
try_files $uri $uri/ =404;
}
}

View File

@ -0,0 +1,10 @@
fpm -s dir -t deb -p build/arm-web_$VERSION.deb \
-n arm-web -v $VERSION \
--deb-priority optional --force \
--deb-compression bzip2 \
--description "Automatic Ripping Machine Web Interface" \
-m "cats <admin@meow.tf>" --vendor "Meow.tf" \
--depends nginx \
--url "https://meow.tf" \
packaging/arm.conf=/etc/nginx/conf.d/arm.conf \
dist/=/var/www/arm-web

View File

@ -0,0 +1 @@
curl -X POST "$UPLOAD_URL" -F "file=@build/arm-web_$VERSION.deb"