Skip to content

Commit 3d16e2b

Browse files
authored
Merge pull request #534 from MatrixAI/feature-cli_migration
CLI migration
2 parents fc82a3d + f7708f6 commit 3d16e2b

File tree

210 files changed

+9596
-32567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

210 files changed

+9596
-32567
lines changed

.gitlab-ci.yml

Lines changed: 0 additions & 380 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,6 @@ Our main website is https://polykey.io
4646
npm install --save polykey
4747
```
4848

49-
### Nix/NixOS
50-
51-
Building the releases:
52-
53-
```sh
54-
nix-build ./release.nix --attr application
55-
nix-build ./release.nix --attr docker
56-
nix-build ./release.nix --attr package.linux.x64.elf
57-
nix-build ./release.nix --attr package.windows.x64.exe
58-
nix-build ./release.nix --attr package.macos.x64.macho
59-
```
60-
61-
Install into Nix user profile:
62-
63-
```sh
64-
nix-env -f ./release.nix --install --attr application
65-
```
66-
67-
### Docker
68-
69-
Install into Docker:
70-
71-
```sh
72-
docker load --input "$(nix-build ./release.nix --attr docker)"
73-
```
74-
7549
## Development
7650

7751
Run `nix-shell`, and once you're inside, you can use:
@@ -91,14 +65,6 @@ npm run lint
9165
npm run lintfix
9266
```
9367

94-
### Generating GRPC Stubs
95-
96-
Once you update the `src/proto/schemas` files, run this to update the `src/proto/js` files.
97-
98-
```sh
99-
npm run proto-generate
100-
```
101-
10268
### Calling Commands
10369

10470
When calling commands in development, use this style:
@@ -127,65 +93,3 @@ npm publish --access public
12793
git push
12894
git push --tags
12995
```
130-
131-
### Packaging Cross-Platform Executables
132-
133-
We use `pkg` to package the source code into executables.
134-
135-
This requires a specific version of `pkg` and also `node-gyp-build`.
136-
137-
Configuration for `pkg` is done in:
138-
139-
* `package.json` - Pins `pkg` and `node-gyp-build`, and configures assets and scripts.
140-
* `utils.nix` - Pins `pkg` for Nix usage
141-
* `release.nix` - Build expressions for executables
142-
143-
## Deployment
144-
145-
Image deployments are done automatically through the CI/CD. However manual scripts are available below for deployment.
146-
147-
### Deploying to AWS ECR:
148-
149-
#### Using skopeo
150-
151-
```sh
152-
tag='manual'
153-
registry_image='015248367786.dkr.ecr.ap-southeast-2.amazonaws.com/polykey'
154-
155-
# Authenticates skopeo
156-
aws ecr get-login-password \
157-
| skopeo login \
158-
--username AWS \
159-
--password-stdin \
160-
"$registry_image"
161-
162-
build="$(nix-build ./release.nix --attr docker)"
163-
# This will push both the default image tag and the latest tag
164-
./scripts/deploy-image.sh "$build" "$tag" "$registry_image"
165-
```
166-
167-
#### Using docker
168-
169-
```sh
170-
tag='manual'
171-
registry_image='015248367786.dkr.ecr.ap-southeast-2.amazonaws.com/polykey'
172-
173-
aws ecr get-login-password \
174-
| docker login \
175-
--username AWS \
176-
--password-stdin \
177-
"$registry_image"
178-
179-
build="$(nix-build ./release.nix --attr docker)"
180-
loaded="$(docker load --input "$build")"
181-
image_name="$(cut -d':' -f2 <<< "$loaded" | tr -d ' ')"
182-
default_tag="$(cut -d':' -f3 <<< "$loaded")"
183-
184-
docker tag "${image_name}:${default_tag}" "${registry_image}:${default_tag}"
185-
docker tag "${image_name}:${default_tag}" "${registry_image}:${tag}"
186-
docker tag "${image_name}:${default_tag}" "${registry_image}:latest"
187-
188-
docker push "${registry_image}:${default_tag}"
189-
docker push "${registry_image}:${tag}"
190-
docker push "${registry_image}:latest"
191-
```

default.nix

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)