Skip to content

Commit ca05b2b

Browse files
refactor: refactor the whole thing (#17)
1 parent 44dcfe7 commit ca05b2b

Some content is hidden

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

99 files changed

+5240
-13865
lines changed

.assets/templates/brew.rb

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# DO NOT EDIT
2+
# -----------
3+
# This file is generated by the `Paperspace/cli` repository and automatically
4+
# merged into the `Paperspace/homebrew-tap` repository. Any changes made to this
5+
# file will be overwritten.
6+
7+
# typed: false
8+
# frozen_string_literal: true
9+
10+
class Pscale < Formula
11+
desc "The Paperspace CLI"
12+
homepage "https://github.com/Paperspace/cli"
13+
version "{{PSPACE_VERSION}}"
14+
license "Apache 2.0"
15+
16+
on_macos do
17+
if Hardware::CPU.arm?
18+
url "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-macos-arm.zip"
19+
sha256 "{{PSPACE_SHA256_MACOS_ARM}}"
20+
21+
def install
22+
bin.install "pspace"
23+
generate_completions_from_executable(bin/"pspace", "completions", shells: [:bash, :zsh, :fish])
24+
end
25+
end
26+
if Hardware::CPU.intel?
27+
url "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-macos.zip"
28+
sha256 "{{PSPACE_SHA256_MACOS}}"
29+
30+
def install
31+
bin.install "pspace"
32+
generate_completions_from_executable(bin/"pspace", "completions", shells: [:bash, :zsh, :fish])
33+
end
34+
end
35+
end
36+
37+
on_linux do
38+
if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
39+
url "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-linux.zip"
40+
sha256 "{{PSPACE_SHA256_LINUX}}"
41+
42+
def install
43+
bin.install "pspace"
44+
generate_completions_from_executable(bin/"pspace", "completions", shells: [:bash, :zsh, :fish])
45+
end
46+
end
47+
end
48+
49+
test do
50+
system "#{bin}/pspace --version"
51+
end
52+
end

.assets/templates/scoop.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "{{PSPACE_VERSION}}",
3+
"architecture": {
4+
"64bit": {
5+
"url": "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-windows.zip",
6+
"bin": ["pspace.exe"],
7+
"hash": "{{PSPACE_SHA256_WINDOWS}}"
8+
}
9+
},
10+
"homepage": "https://github.com/Paperspace/cli",
11+
"license": "Apache 2.0",
12+
"description": "The Paperspace CLI"
13+
}

.github/workflows/pull-request.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
branches:
66
- main
7+
- next
8+
- alpha
9+
- canary
710

811
jobs:
912
build:
@@ -19,7 +22,7 @@ jobs:
1922
deno-version: 1.x.x
2023

2124
- name: Check types
22-
run: deno task check
25+
run: deno check mod.ts
2326

2427
- name: Lint
2528
run: deno lint

.github/workflows/release.yml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
push:
55
branches:
66
- main
7+
- next
8+
- alpha
9+
- canary
10+
11+
concurrency: release-${{ github.head_ref }}
12+
permissions:
13+
contents: write
714

815
jobs:
916
release:
@@ -13,27 +20,22 @@ jobs:
1320
- name: Checkout
1421
uses: actions/checkout@v3
1522

23+
- name: Setup Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 18.x.x
27+
1628
- name: Setup Deno
1729
uses: denoland/setup-deno@v1
1830
with:
1931
deno-version: 1.x.x
2032

21-
- name: Setup Node.js
22-
id: setup-node
23-
uses: actions/setup-node@v3
24-
with:
25-
node-version: 18.x
26-
27-
- name: Setup package.json
28-
run: echo '{"name":"@paperspace/cli","version":"0.0.0","repository":{"type":"git","url":"https://github.com/paperspace/cli.git"},"author":"Jared Lunde <[email protected]>","license":"MIT","bugs":{"url":"https://github.com/paperspace/cli/issues"},"homepage":"https://paperspace.com/","devDependencies":{"@google/semantic-release-replace-plugin":"^1.2.0","@semantic-release/exec":"^6.0.3"}}' > package.json
33+
- name: Install semantic release
34+
run: |
35+
npm init -y
36+
npm i semantic-release @google/semantic-release-replace-plugin @semantic-release/exec
2937
30-
- name: Install dependencies
31-
run: npm install
32-
33-
- name: Install zip
34-
uses: montudor/action-zip@v1
35-
3638
- name: Release
39+
run: npx semantic-release
3740
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
run: npx semantic-release
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
node_modules
55
lock.json
66
.paperspace
7+
.pspace
78
.coverage

.graphql/codegen.yml

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

.graphql/deployments/mutations.graphql

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

.graphql/deployments/queries.graphql

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

0 commit comments

Comments
 (0)