Skip to content

Commit

Permalink
refactor: refactor the whole thing (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
jared-paperspace authored Feb 28, 2023
1 parent 44dcfe7 commit ca05b2b
Show file tree
Hide file tree
Showing 99 changed files with 5,240 additions and 13,865 deletions.
52 changes: 52 additions & 0 deletions .assets/templates/brew.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# DO NOT EDIT
# -----------
# This file is generated by the `Paperspace/cli` repository and automatically
# merged into the `Paperspace/homebrew-tap` repository. Any changes made to this
# file will be overwritten.

# typed: false
# frozen_string_literal: true

class Pscale < Formula
desc "The Paperspace CLI"
homepage "https://github.com/Paperspace/cli"
version "{{PSPACE_VERSION}}"
license "Apache 2.0"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-macos-arm.zip"
sha256 "{{PSPACE_SHA256_MACOS_ARM}}"

def install
bin.install "pspace"
generate_completions_from_executable(bin/"pspace", "completions", shells: [:bash, :zsh, :fish])
end
end
if Hardware::CPU.intel?
url "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-macos.zip"
sha256 "{{PSPACE_SHA256_MACOS}}"

def install
bin.install "pspace"
generate_completions_from_executable(bin/"pspace", "completions", shells: [:bash, :zsh, :fish])
end
end
end

on_linux do
if Hardware::CPU.intel? && Hardware::CPU.is_64_bit?
url "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-linux.zip"
sha256 "{{PSPACE_SHA256_LINUX}}"

def install
bin.install "pspace"
generate_completions_from_executable(bin/"pspace", "completions", shells: [:bash, :zsh, :fish])
end
end
end

test do
system "#{bin}/pspace --version"
end
end
13 changes: 13 additions & 0 deletions .assets/templates/scoop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "{{PSPACE_VERSION}}",
"architecture": {
"64bit": {
"url": "https://github.com/Paperspace/cli/releases/download/v{{PSPACE_VERSION}}/pspace-windows.zip",
"bin": ["pspace.exe"],
"hash": "{{PSPACE_SHA256_WINDOWS}}"
}
},
"homepage": "https://github.com/Paperspace/cli",
"license": "Apache 2.0",
"description": "The Paperspace CLI"
}
5 changes: 4 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches:
- main
- next
- alpha
- canary

jobs:
build:
Expand All @@ -19,7 +22,7 @@ jobs:
deno-version: 1.x.x

- name: Check types
run: deno task check
run: deno check mod.ts

- name: Lint
run: deno lint
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
push:
branches:
- main
- next
- alpha
- canary

concurrency: release-${{ github.head_ref }}
permissions:
contents: write

jobs:
release:
Expand All @@ -13,27 +20,22 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18.x.x

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: 1.x.x

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Setup package.json
run: echo '{"name":"@paperspace/cli","version":"0.0.0","repository":{"type":"git","url":"https://github.com/paperspace/cli.git"},"author":"Jared Lunde <jared.lunde@gmail.com>","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
- name: Install semantic release
run: |
npm init -y
npm i semantic-release @google/semantic-release-replace-plugin @semantic-release/exec
- name: Install dependencies
run: npm install

- name: Install zip
uses: montudor/action-zip@v1

- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
node_modules
lock.json
.paperspace
.pspace
.coverage
22 changes: 0 additions & 22 deletions .graphql/codegen.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .graphql/deployments/mutations.graphql

This file was deleted.

187 changes: 0 additions & 187 deletions .graphql/deployments/queries.graphql

This file was deleted.

Loading

0 comments on commit ca05b2b

Please sign in to comment.