Skip to content

Commit

Permalink
chore: zip commands
Browse files Browse the repository at this point in the history
  • Loading branch information
loic-roux-404 committed Jun 12, 2021
1 parent 6c4b91e commit dae97cd
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ on:

jobs:
release:

name: Publish release - github
if: >
contains(github.event.head_commit.message, '[skip-release]') == false
&& contains(github.event.pull_request.labels.*.name, 'skip-release') == false
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: log commit in common
Expand All @@ -35,14 +34,17 @@ jobs:
restore-keys: |
${{ runner.os }}-node-
- name: semver plugins
run: |
npm install '@semantic-release/changelog' \
'@semantic-release/exec' \
'@semantic-release/commit-analyzer' \
'@semantic-release/github' \
'@semantic-release/release-notes-generator' \
semantic-release
- run: npm i
- name: semver plugins
env:
CMC_PRO_API_KEY: ${{secrets.CMC_PRO_API_KEY}}
run: |
npm install '@semantic-release/changelog' \
'@semantic-release/exec' \
'@semantic-release/commit-analyzer' \
'@semantic-release/github' \
'@semantic-release/release-notes-generator' \
semantic-release
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .manala.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
####################################################################

manala:
recipe: ops.cd
recipe: dev.jxa
repository: /Users/loic/Ops/manala-recipes

# Default vars
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
"name": "pull-cryptos-prices",
"version": "0.1.0",
"license": "MIT",
"source": "src/index.js",
"dependencies": {
"cjxa-scripts": "0.0.13",
"jxabundler": "^1.0.12"
},
"scripts": {
"debug-ci": "ls .; ls */*",
"package": "npm i && npm run build; npm run debug-ci;tar zcvf build/$npm_package_name.app.tar.gz ./build/$npm_package_name.js.app/",
"package:app-zip": "zip -r build/$npm_package_name.app.zip build/$npm_package_name.js.app",
"package": "npm run build && npm run package:app-zip",
"run-script": "osascript build/pull-cryptos-prices.js",
"build": "jxabundler -t app",
"test": "jest",
"start": "jxabundler watch -t app"
"start": "npm run build --watch"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
9 changes: 4 additions & 5 deletions src/cmcApi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { run, getEnv } from "./utils/shell"

export default {
url: 'pro-api.coinmarketcap.com',
headers: {
'X-CMC_PRO_API_KEY': '57c7edd3-62c2-4172-9c9e-1ee3130f52b2'
'X-CMC_PRO_API_KEY': getEnv('CMC_PRO_API_KEY')
},
defaultsParams: {
convert: 'USD',
Expand All @@ -24,11 +26,8 @@ export default {
.join(' ');
},
fetch(url, additionalsHeaders = {}) {
const app = Application.currentApplication();
app.includeStandardAdditions = true;

return JSON.parse(
app.doShellScript(`curl ${this.createHeaders(additionalsHeaders)} -fsL -G '${url}'`)
run(`curl ${this.createHeaders(additionalsHeaders)} -fsL -G '${url}'`)
)
},
getQuotes(symbols) {
Expand Down
4 changes: 1 addition & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ import { friendlyDate } from './utils/date';
const cellsRange = table.cellRange();

// Simple Helper
const testValidValueCell = cell => {
return cell.column().address() === 1 &&
const testValidValueCell = cell => cell.column().address() === 1 &&
cell.row().address() > table.headerRowCount() &&
cell.row().address() <= (table.rowCount() - table.footerRowCount()) &&
cell.value() != null;
}

const quotes = cmcApi.getQuotes(
cellsRange
Expand Down

0 comments on commit dae97cd

Please sign in to comment.