update travis.yml

This commit is contained in:
unknown 2019-12-03 15:13:45 +08:00
parent 2fc39c52ae
commit 829e3a1e47
1 changed files with 7 additions and 6 deletions

View File

@ -14,15 +14,10 @@ script:
- docker --version
- export VERSION=0.24.1
- git clone https://github.com/cnlh/spksrc.git ~/spksrc
- mkdir ~/spksrc/nps && cp -rf ./* ~/spksrc/nps/
- docker run -itd --name spksrc --env VERSION=$VERSION -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash
- docker exec -it spksrc /bin/bash -c 'cd /spksrc && make setup && cd /spksrc/spk/npc && make'
- cp ~/spksrc/packages/npc_noarch-all_$VERSION-1.spk ./npc_$VERSION.spk
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export DOCKER_CLI_EXPERIMENTAL=enabled
- docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
- docker buildx create --use --name mybuilder
- docker buildx build --tag ffdfgdfg/nps:$VERSION --output type=image,push=true --file Dockerfile.nps --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
- docker buildx build --tag ffdfgdfg/npc:$VERSION --output type=image,push=true --file Dockerfile.npc --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
before_deploy:
- wget https://github.com/upx/upx/releases/download/v3.95/upx-3.95-amd64_linux.tar.xz
- tar -xvf upx-3.95-amd64_linux.tar.xz
@ -177,6 +172,12 @@ before_deploy:
- tar -czvf win_386_server.tar.gz conf/nps.conf conf/tasks.json conf/clients.json conf/hosts.json conf/server.key conf/server.pem web/views web/static nps.exe
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- export DOCKER_CLI_EXPERIMENTAL=enabled
- docker run --rm --privileged docker/binfmt:66f9012c56a8316f9244ffd7622d7c21c1f6f28d
- docker buildx create --use --name mybuilder
- docker buildx build --tag ffdfgdfg/nps:$VERSION --output type=image,push=true --file Dockerfile.nps --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
- docker buildx build --tag ffdfgdfg/npc:$VERSION --output type=image,push=true --file Dockerfile.npc --platform=linux/amd64,linux/arm64,linux/386,linux/arm .
deploy:
provider: releases