Skip to content

Commit

Permalink
update changelog and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
codespool committed Dec 14, 2022
1 parent fad965f commit 30627f5
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 3 deletions.
79 changes: 76 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,79 @@
### How to run locally
# Structure

Repo is split into separate packages, and uses [Lerna](https://github.com/lerna/lerna) to handle builds/versioning.

## `cli`

Holds the cli itself, with implementation of all the commands.
Based on [oclif](https://github.com/oclif/oclif) framework

## `core`

All the shared helper and utility methods.
Look here if you're developing a plugin.

## `templates`

Holds templates for instantiating a new project,
as well as ink! and ask! contract templates.

# Local development

Clone this repo, and install with yarn/npm.

Build using Lerna command.

```
yarn
npx lerna run build
./packages/cli/bin/dev -h
```

To build individual projects, provide the `scope` argument:

```
npx lerna run build --scope=@astar-network/swanky-core
```

Oclif provides a `dev` script to run the cli without building it, but beware, the dependencies need to be built nevertheless.

So, if you make changes to `swanky-core`, you need to build it before using it in `swanky-cli`.

# Publishing

## To npm

Be sure to run `npx lerna run build` first.

After that, run `npx lerna publish --no-private` and choose an appropriate version.

Alternatively, add version tags first with `npx lerna version`, and run `npx lerna publish --no-private from-git`

## To github

> Only `cli` is packed and released this way. The other libs must be published to npm.
Pack the cli into a tarball from the `packages/cli` directory:

```
cd packages/cli
npx oclif npx oclif pack tarballs --targets=darwin-x64,linux-x64
```

Create a release through the github interface and upload the built `.tar.gz files`.

# Plugin development

Cli supports plugins through Oclif's [plugin-plugins](https://github.com/oclif/plugin-plugins) package.

To load a local dev version of a plugin into globally installed swanky, run

```
swanky plugins:link [path_to_local_repo]
```

Example: [swanky-plugin-phala](https://github.com/AstarNetwork/swanky-plugin-phala)

# Contributing

Please submit an issue on any bug you find or an improvement suggestion you have.

PRs are also very welcome.
17 changes: 17 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## v1.0.6 (2022-12-14)

Deprecating the manual changelog and moving to GitHub releases.

## v1.0.0 (2022-12-12)

### Features

- integration tests and test templates

### Breaking changes

- using typechain-compiler to compile ink! contracts, still unstable with multiple contracts

### Trivial changes

- bug fixes and dependency compatibility issues fixed

## v0.3.0 (2022-11-01)

Expand Down

0 comments on commit 30627f5

Please sign in to comment.