Skip to content

Commit 03b0743

Browse files
authored
Move typescript code to ts (#514)
* Move typescript code to ts * update typescript release workflows and ts CONTRIBUTING.md * clean up go. more context in PR#331
1 parent 1a06de0 commit 03b0743

Some content is hidden

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

75 files changed

+28
-196392
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -78,38 +78,3 @@ jobs:
7878
run: |
7979
cd go
8080
make all
81-
82-
e2e-ci:
83-
needs: [node-ci, go-ci]
84-
strategy:
85-
matrix:
86-
platform: [ubuntu-latest, macos-latest]
87-
node-version: [12.x, 14.x]
88-
runs-on: ${{ matrix.platform }}
89-
steps:
90-
- uses: actions/checkout@v1
91-
- name: Use Node.js ${{ matrix.node-version }}
92-
uses: actions/setup-node@v1
93-
with:
94-
node-version: ${{ matrix.node-version }}
95-
- name: Install NPM packages
96-
run: |
97-
cd ts/demo-functions
98-
npm ci
99-
- name: Build docker images
100-
if: matrix.platform == 'ubuntu-latest'
101-
run: |
102-
cd ts/demo-functions
103-
npm run kpt:docker-build
104-
- name: Run all e2e tests
105-
if: matrix.platform == 'ubuntu-latest'
106-
run: |
107-
sudo curl https://storage.googleapis.com/kpt-dev/latest/linux_amd64/kpt -o /usr/local/bin/kpt
108-
sudo chmod +x /usr/local/bin/kpt
109-
tests/e2e.sh
110-
- name: Run non-docker e2e tests
111-
if: matrix.platform == 'macos-latest'
112-
run: |
113-
sudo curl https://storage.googleapis.com/kpt-dev/latest/darwin_amd64/kpt -o /usr/local/bin/kpt
114-
sudo chmod +x /usr/local/bin/kpt
115-
NODOCKER=true tests/e2e.sh

.github/workflows/release-create-kpt-functions.yaml renamed to .github/workflows/release-ts-create-kpt-functions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: release-create-kpt-functions
1+
name: release-ts-create-kpt-functions
22

33
on:
44
push:
55
tags:
6-
- release-create-kpt-functions-*
6+
- release-ts-create-kpt-functions-*
77

88
jobs:
99
release:
@@ -23,6 +23,6 @@ jobs:
2323
- name: Publish
2424
run: |
2525
cd ts/create-kpt-functions
26-
../../scripts/publish-npm.sh $GITHUB_REF
26+
../scripts/publish-npm.sh $GITHUB_REF
2727
env:
2828
NODE_AUTH_TOKEN: ${{ secrets.WOMBAT_CREATE_KPT_FUNCTIONS }}

.github/workflows/release-demo-functions.yaml renamed to .github/workflows/release-ts-demo-functions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: release-demo-functions
1+
name: release-ts-demo-functions
22

33
on:
44
push:
55
tags:
6-
- release-demo-functions-*
6+
- release-ts-demo-functions-*
77

88
jobs:
99
e2e-ci:

.github/workflows/release-kpt-functions.yaml renamed to .github/workflows/release-ts-kpt-functions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: release-kpt-functions
1+
name: release-ts-kpt-functions
22

33
on:
44
push:
55
tags:
6-
- release-kpt-functions-*
6+
- release-ts-kpt-functions-*
77

88
jobs:
99
release:
@@ -23,6 +23,6 @@ jobs:
2323
- name: Publish
2424
run: |
2525
cd ts/kpt-functions
26-
../../scripts/publish-npm.sh $GITHUB_REF
26+
../scripts/publish-npm.sh $GITHUB_REF
2727
env:
2828
NODE_AUTH_TOKEN: ${{ secrets.WOMBAT_KPT_FUNCTIONS }}

.github/workflows/release-typegen.yaml

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

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ dist
33
node_modules
44
*.iml
55
.npmrc
6-
go/.out
6+
ts/go/.out
77
ts/create-kpt-functions/bin
88
.DS_Store
99
*.swo

go/Makefile

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
GOPATH := $(shell go env GOPATH)
44
OUT_DIR := .out
55

6-
all: fix fmt test test-e2e lint
6+
all: fix fmt test lint
77

88
api:
99
(which swagger || go install github.com/go-swagger/go-swagger/cmd/swagger@v0.27.0)
10-
$(GOPATH)/bin/swagger generate spec -m -w pkg/api/kptfile/v1 -o ../openapi/kptfile.yaml
10+
$(GOPATH)/bin/swagger generate spec -m -w api/kptfile/v1 -o ../openapi/kptfile.yaml
1111

1212
fix:
1313
go fix ./...
@@ -22,18 +22,5 @@ lint:
2222
test:
2323
go test -cover ./...
2424

25-
test-e2e:
26-
./scripts/e2e.sh
27-
2825
vet:
2926
go vet ./...
30-
31-
build-typegen: fix fmt test lint
32-
env GOOS=linux GOARCH=amd64 go build -o $(OUT_DIR)/linux/typegen ./cmd/typegen
33-
env GOOS=darwin GOARCH=amd64 go build -o $(OUT_DIR)/darwin/typegen ./cmd/typegen
34-
env GOOS=windows GOARCH=amd64 go build -o $(OUT_DIR)/windows/typegen ./cmd/typegen
35-
36-
package-typegen: build-typegen
37-
tar -C $(OUT_DIR)/linux -czvf $(OUT_DIR)/typegen_linux_amd64.tar.gz typegen
38-
tar -C $(OUT_DIR)/darwin -czvf $(OUT_DIR)/typegen_darwin_amd64.tar.gz typegen
39-
tar -C $(OUT_DIR)/windows -czvf $(OUT_DIR)/typegen_windows_amd64.tar.gz typegen

go/README.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"fmt"
1919
"strings"
2020

21-
kptfilev1 "github.com/GoogleContainerTools/kpt-functions-sdk/go/pkg/api/kptfile/v1"
21+
kptfilev1 "github.com/GoogleContainerTools/kpt-functions-sdk/go/api/kptfile/v1"
2222
"gopkg.in/yaml.v3"
2323
)
2424

0 commit comments

Comments
 (0)