Skip to content

Commit

Permalink
Test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
StrongMonkey committed Mar 15, 2022
1 parent b90d518 commit 0f4c087
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 42 deletions.
42 changes: 17 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 2.1
orbs:
node: circleci/[email protected]
gh: circleci/[email protected]
jobs:
build:
executor:
Expand All @@ -10,6 +11,7 @@ jobs:
- checkout
- run: yarn install
- run: yarn build

release:
executor:
name: node/default
Expand All @@ -19,41 +21,31 @@ jobs:
- run: yarn install
- run: yarn build
- run: yarn pkg
publish-github-release:
- persist_to_workspace:
root: .
paths:
- ./dist/artifacts
upload:
docker:
- image: cibuilds/github:0.10
- image: 'cimg/base:stable'
steps:
- attach_workspace:
at: ./dist/artifacts
- run:
name: "Publish Release on GitHub"
filters:
tags:
only: /^v.*/
command: |
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./dist/artifacts/
- checkout
- gh/setup
- run: gh release upload --repo "$(git config --get remote.origin.url)" ${CIRCLE_TAG} /tmp/dist/artifacts/**

workflows:
version: 2
build:
build-and-release:
jobs:
- build:
filters:
branches:
only: /^main/
release:
jobs:
- build:
filters:
branches:
only: /^main/
- build
- release:
requires:
- build
filters:
tags:
only: /^v.*/
- publish-github-release:
- upload:
pre-steps:
- attach_workspace:
at: /tmp
requires:
- release
filters:
Expand Down
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
Hightouch CLI
=================
# Hightouch CLI

Hightouch CLI to list, inspect resources and trigger syncs

[![CircleCI](https://circleci.com/gh/hightouchio/cli.svg?style=shield)](https://circleci.com/gh/hightouchio/cli)

## Demo

[![asciicast](https://asciinema.org/a/kFXceRxY6hPTlCz4YeRHv6hGt.svg)](https://asciinema.org/a/kFXceRxY6hPTlCz4YeRHv6hGt)

## Installation

To install from curl script, run

```shell

curl -sLf https://raw.githubusercontent.com/hightouchio/cli/main/install.sh | sh -
```

To install from Github package, download the latest release from here. Put

## Development
Note: Make sure you know what you are doing when running scripts.

Hightouch cli is written in typescripts. To test or develop in local development:

1. Install latest [LTS](https://nodejs.org/en/download/) nodejs.

2. Run
```shell
$ ./script/dev
```
To install from Github package, download the latest release from [here](https://github.com/hightouchio/cli/releases).

<!-- usagestop -->
## Commands
<!-- commands -->
## Command Topics

Expand All @@ -40,6 +35,17 @@ $ ./script/dev

<!-- commandsstop -->

## Local Development

Hightouch cli is written in typescripts. To test or develop in local development:

1. Install latest [LTS](https://nodejs.org/en/download/) nodejs.

2. Run
```shell
$ ./script/dev
```

## License

Copyright [2022] [Carry Technologies, Inc. dba Hightouch](https://hightouch.io/)
Expand Down
5 changes: 4 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,18 @@ setup_env() {
# --- set arch and suffix, fatal if architecture not supported ---
setup_verify_arch() {
OS=$(echo "$(uname)"|tr '[:upper:]' '[:lower:]')
SUF="linux"

case "$OS" in
# Minimalist GNU for Windows
mingw*) OS='windows';;
linux)
;;
windows)
SUF="win.exe"
;;
darwin)
SUF="macos"
;;
*)
fatal "Unsupported OS $OS"
Expand Down Expand Up @@ -81,7 +84,7 @@ setup_verify_arch() {
fatal "Unsupported architecture $ARCH"
esac

SUFFIX=-${OS}-${ARCH}
SUFFIX=-${SUF}
}

# --- fatal if no curl ---
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"prepack": "yarn build && oclif manifest && oclif readme",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"readme": "oclif readme --dir docs",
"pkg": "pkg --output ./dist/artifacts/ht ."
"pkg": "pkg --output ./dist/artifacts/ht . && ./scripts/sha256sum.sh"
},
"license": "Apache-2.0",
"engines": {
Expand Down
9 changes: 9 additions & 0 deletions scripts/sha256sum.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
set -e

SHA="sha256sum"
if [ "$(uname)" = "Darwin" ]; then
SHA="shasum -a 256"
fi

cd ./dist/artifacts && find ht* -type f -exec $SHA {} \; > ./sha256sum-amd64.txt;

0 comments on commit 0f4c087

Please sign in to comment.