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

chore: fix: update to oclif v3 instead of archived/obsolete oclif-dev v1 #2743

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 4 additions & 5 deletions .github/workflows/minikube-chectl-release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.16.1
- name: Pack chectl binaries
run: yarn && npx oclif-dev pack --targets=linux-x64
- name: UnPack chectl binaries in $HOME/chectl
- name: Pack chectl binary (single arch target)
run: yarn && yarn prepack && yarn pack-binaries --targets=linux-x64
- name: Unpack chectl tarball to $HOME/chectl
run: |
# Will unpack chectl binaries in $HOME/chectl
tar -xvf dist/channels/*/chectl-linux-x64.tar.gz -C $HOME
tar -xvf $(find dist/ -name "chectl*linux-x64.tar.gz" | head -1) -C $HOME
echo "$HOME/chectl/bin" >> $GITHUB_PATH
rm -rf tmp/
- name: Run tests
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.16.1
- name: Build chectl
- name: Install yarn deps
run: yarn
- name: Run eslint
run: yarn lint
Expand All @@ -43,16 +43,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.16.1
- name: Build chectl
run: yarn
- name: Build chectl and pack binaries
run: yarn && yarn pack-binaries --targets=linux-x64
- name: Build README.md
run: yarn oclif-dev readme
run: DEBUG=* npx oclif readme
- name: Check README.md state
run: |
IFS=$'\n' read -d '' -r -a FILES_CHANGED_ARRAY < <( git ls-files -m ) || true
# check if readme it is up to date
if [[ " ${FILES_CHANGED_ARRAY[@]} " =~ "README.md" ]]; then
echo "[ERROR] README.md it is not up to date. Please run 'yarn oclif-dev readme' to update and commit the changes."
echo "[ERROR] README.md it is not up to date. Please run 'yarn oclif readme' to update and commit the changes."
exit 1
fi
license-validation:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-build-and-push-to-GH-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
git tag ${{ steps.TAG_UTIL.outputs.gh_tag }}
TARGETS=linux-arm,linux-x64,linux-s390x,linux-ppc64le,darwin-x64,darwin-arm64,win32-x64,win32-x86
npx oclif-dev pack --targets=$TARGETS
yarn prepack && yarn pack-binaries --targets=$TARGETS
- name: Create Release and push artifacts
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.TAG_UTIL.outputs.gh_release_name }}
tag_name: ${{ steps.TAG_UTIL.outputs.gh_tag }}
files: "./dist/channels/**/chectl-*.gz"
files: "./dist/chectl-*.gz"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update github pages
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
},
{
"label": "Update README.md",
"command": "yarn oclif-dev readme",
"command": "yarn oclif readme",
"type": "shell",
"args": [],
"problemMatcher": [
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ Testing summary will be printed to the output.
To test ensure `chectl` is built successfully, launch the `[Chectl] Run` command. It wil run `chectl` with `--help` directive.

## Package binaries
For packaging binaries, [oclif](https://github.com/oclif/dev-cli) is used. It generates packages for Linux, Windows, and MacOS operating systems and puts the result in the `dist/channels/stable` directory.
For packaging binaries, [oclif](https://github.com/oclif/dev-cli) is used. It generates packages for Linux, Windows, and MacOS operating systems and puts the result in the `dist/` directory.
To start packaging, just run the `[Chectl] Package Binaries` command. It will run the following in the `/projects/chectl` directory:

```bash
yarn oclif-dev pack
yarn oclif pack tarballs --no-xz --parallel
```

> Note: you need to build your `chectl` before by `yarn` command, or install all node packages by running `npm install` in `/projects/chectl` directory.
Expand Down
Loading