Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update repo structure and fix circleci publish job #28

Merged
merged 10 commits into from
Oct 9, 2020
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ _refs:
install: &install
name: Install dependencies
command: |
git --version
npm --version
node --version
npm install
Expand Down Expand Up @@ -63,6 +64,23 @@ jobs:
key: v1-npm-{{checksum ".circleci/config.yml"}}-{{checksum "package.json"}}
paths:
- ~/cli/node_modules

build-artifact:
description: 'Building and archiving tarball'
<<: *defaults
steps:
- checkout
- restore_cache: *restore_cache
- run: *install
- run: npm pack
- run:
name: Staging artifact
command: |
mkdir artifact
find . -name "*.tgz" -type f -exec cp {} ./artifact \;
- store_artifacts:
path: ./artifact

publish:
<<: *defaults
steps:
Expand Down Expand Up @@ -110,6 +128,7 @@ workflows:
jobs:
- node-latest
- node-12
- build-artifact
- cache:
filters:
tags:
Expand All @@ -126,6 +145,7 @@ workflows:
color: "#0E1111"
- node-latest
- node-12
- build-artifact
- hold: # Requires manual approval in Circle Ci
type: approval
- publish:
Expand All @@ -137,6 +157,7 @@ workflows:
requires:
- node-latest
- node-12
- build-artifact
- hold

scheduled-workflow:
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
# yarn lock
yarn.lock

# Files generated by prepare script
/*.schema.json
/index.js

# Logs
logs
*.log
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For most other editors, you can use the schemas by adding the `$schema` property

```json
{
"$schema": "https://raw.githubusercontent.com/forcedotcom/schemas/master/schemas/sfdx-project.schema.json"
"$schema": "https://raw.githubusercontent.com/forcedotcom/schemas/main/sfdx-project.schema.json"
//...
}
```
Expand Down
File renamed without changes.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
"scripts": {
"commit-init": "commitizen init cz-conventional-changelog --save-dev --save-exact --force",
"commit": "git-cz",
"prepare": "npx shx cp -r schemas/* ./",
"postpublish": "npx shx rm -f index.js ./*.schema.json",
"test": "jest",
"prettier": "prettier ./**/*.{js,json,ts,md} --write"
},
Expand All @@ -31,7 +29,7 @@
"commitizen": "^3.0.5",
"cz-conventional-changelog": "^2.1.0",
"ajv": "^6.10.2",
"husky": "^3.0.2",
"husky": "1.3.1",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sfsholden I had to downgrade this to an older version because newer versions of husky fail to install when CircleCI install git version 2.11.0. I tried installing a newer version of git while building but that didn't work either. Do you have any suggestions on other things we could try ?

"jest": "^24.8.0",
"prettier": "^1.18.2"
},
Expand Down
Loading