Update and fix circleci and add build step
This commit is contained in:
parent
8f7b8e24a2
commit
ba12f8f59e
3 changed files with 9 additions and 2 deletions
|
@ -9,12 +9,17 @@ jobs:
|
|||
- run:
|
||||
name: Install npm deployment app
|
||||
command: sudo npm install -g github-release-cli
|
||||
- run:
|
||||
name: Build client javascript
|
||||
command: |
|
||||
npm install
|
||||
npm run build
|
||||
- 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.zip" index.mjs package.json api/**
|
||||
zip "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" index.mjs package.json public api/**
|
||||
echo "Creating release '${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}'"
|
||||
github-release upload \
|
||||
--commitish $CIRCLE_SHA1 \
|
||||
|
@ -24,7 +29,7 @@ jobs:
|
|||
--tag "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \
|
||||
--name "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \
|
||||
--body "Automatic CircleCI Build of v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM} from ${CIRCLE_SHA1}" \
|
||||
sc-helloworld_build-sc.zip
|
||||
"${CIRCLE_PROJECT_REPONAME}_build-sc.zip"
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -106,3 +106,4 @@ dist
|
|||
db.json
|
||||
app/*
|
||||
manage/*
|
||||
public/main.js
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"js:build:main": "asbundle client/index.js public/main.js",
|
||||
"dev:server": "nodemon --watch runner.mjs --watch api runner.mjs | bunyan",
|
||||
"dev:client": "nodemon --watch client --exec \"npm run js:build:main\"",
|
||||
"build": "npm run js:build:main",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
|
|
Loading…
Reference in a new issue