From 1e82f4760476ea208535443bb7bfd0316149af68 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Thu, 2 Dec 2021 12:26:36 +0000 Subject: [PATCH] circleci: Fix bugs and other stuff, switch to 7zip for core --- .circleci/config.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b087b2b..cee5d3b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,11 +3,9 @@ jobs: build: docker: - image: circleci/node:latest + resource_class: medium working_directory: ~/app steps: - - add_ssh_keys: - fingerprints: - - "9d:a2:fe:4c:56:e8:f7:91:14:ed:b8:dd:34:98:25:e9" - checkout - run: name: Install npm deployment app @@ -16,6 +14,7 @@ jobs: name: Check if this is a new release command: | 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}\"" retVal=$? if [ $retVal -eq 0 ]; then @@ -27,13 +26,19 @@ jobs: command: | echo "export COMMIT_MESSAGE=\"$(git log --format=oneline -n 1 $CIRCLE_SHA1)\"" >> $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: name: Create a release command: | 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" - 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 + echo "Creating release v${PACKAGE_VERSION}" + + ./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}'" github-release upload \ --commitish $CIRCLE_SHA1 \