circleci: Fix bugs and other stuff, switch to 7zip for core
This commit is contained in:
parent
3b8405021a
commit
1e82f47604
1 changed files with 11 additions and 6 deletions
|
@ -3,11 +3,9 @@ jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:latest
|
- image: circleci/node:latest
|
||||||
|
resource_class: medium
|
||||||
working_directory: ~/app
|
working_directory: ~/app
|
||||||
steps:
|
steps:
|
||||||
- add_ssh_keys:
|
|
||||||
fingerprints:
|
|
||||||
- "9d:a2:fe:4c:56:e8:f7:91:14:ed:b8:dd:34:98:25:e9"
|
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
name: Install npm deployment app
|
name: Install npm deployment app
|
||||||
|
@ -16,6 +14,7 @@ jobs:
|
||||||
name: Check if this is a new release
|
name: Check if this is a new release
|
||||||
command: |
|
command: |
|
||||||
set +e
|
set +e
|
||||||
|
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
|
||||||
github-release list --owner $CIRCLE_PROJECT_USERNAME --repo $CIRCLE_PROJECT_REPONAME | grep "tag_name=\"v${PACKAGE_VERSION}\""
|
github-release list --owner $CIRCLE_PROJECT_USERNAME --repo $CIRCLE_PROJECT_REPONAME | grep "tag_name=\"v${PACKAGE_VERSION}\""
|
||||||
retVal=$?
|
retVal=$?
|
||||||
if [ $retVal -eq 0 ]; then
|
if [ $retVal -eq 0 ]; then
|
||||||
|
@ -27,13 +26,19 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
echo "export COMMIT_MESSAGE=\"$(git log --format=oneline -n 1 $CIRCLE_SHA1)\"" >> $BASH_ENV
|
echo "export COMMIT_MESSAGE=\"$(git log --format=oneline -n 1 $CIRCLE_SHA1)\"" >> $BASH_ENV
|
||||||
source $BASH_ENV
|
source $BASH_ENV
|
||||||
|
- run:
|
||||||
|
name: Get 7zz
|
||||||
|
command: |
|
||||||
|
wget https://www.7-zip.org/a/7z2106-linux-x64.tar.xz
|
||||||
|
tar -xvf 7z2106-linux-x64.tar.xz
|
||||||
- deploy:
|
- deploy:
|
||||||
name: Create a release
|
name: Create a release
|
||||||
command: |
|
command: |
|
||||||
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
|
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
|
||||||
echo "Packaging to ${CIRCLE_PROJECT_REPONAME}_build-sc.zip"
|
echo "Creating release v${PACKAGE_VERSION}"
|
||||||
zip "${CIRCLE_PROJECT_REPONAME}_build-sc-core.zip" runner.mjs package.json service/* core/**/* core/*
|
|
||||||
zip "${CIRCLE_PROJECT_REPONAME}_app.zip" runner.mjs package.json service/* core/**/* core/* service/* config.json install.bat npminstall.bat README.md start.bat stop.bat uninstall.bat
|
./7zz a "${CIRCLE_PROJECT_REPONAME}_build-sc-core.7z" runner.mjs package.json "service/*" "core/**/*" "core/*" -mx9 -mfb273 -mmt2 -md16M -mqs -myx9
|
||||||
|
./7zz a "${CIRCLE_PROJECT_REPONAME}_app.zip" runner.mjs package.json "service/*" "core/**/*" "core/*" config.json install.bat npminstall.bat README.md uninstall.bat
|
||||||
echo "Creating release '${PACKAGE_VERSION}'"
|
echo "Creating release '${PACKAGE_VERSION}'"
|
||||||
github-release upload \
|
github-release upload \
|
||||||
--commitish $CIRCLE_SHA1 \
|
--commitish $CIRCLE_SHA1 \
|
||||||
|
|
Loading…
Reference in a new issue