Skip to content

Commit

Permalink
build: replace all installation and usage of kit with task
Browse files Browse the repository at this point in the history
- following the installation guide: https://taskfile.dev/installation/
  - use `npm` for the `Makefile` install as it's compatible on different OSes and matches some of our existing tools (like `mdspell`, `markdownlint`, etc)
    - NOTE: this does still need adding to the Nix dir

- replace `kit` in `Makefile`, `pre-build.sh`, and `ci-build.yaml` with `task`

Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
  • Loading branch information
agilgur5 committed Oct 2, 2023
1 parent 7937cbb commit 36d9e60
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/pre-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl cluster-info

# install kit
curl -q https://raw.githubusercontent.com/kitproj/kit/main/install.sh | sh
# install task
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin

# install protocol buffer compiler (protoc)
sudo apt update
Expand All @@ -23,7 +23,7 @@ sudo apt install -y protobuf-compiler
sudo chown -R vscode:vscode /home/vscode/go

# download dependencies and do first-pass compile
CI=1 kit pre-up
CI=1 task pre-up

# Patch CoreDNS to have host.docker.internal inside the cluster available
kubectl get cm coredns -n kube-system -o yaml | sed "s/ NodeHosts: |/ NodeHosts: |\n `grep host.docker.internal /etc/hosts`/" | kubectl apply -f -
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Install manifests
run: make install PROFILE=${{matrix.profile}} STATIC_FILES=false
- name: Build controller
run: make controller kit STATIC_FILES=false
run: make controller task STATIC_FILES=false
- name: Build CLI
run: make cli STATIC_FILES=false
if: ${{matrix.test == 'test-api' || matrix.test == 'test-cli' || matrix.test == 'test-java-sdk' || matrix.test == 'test-python-sdk'}}
Expand Down
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -517,18 +517,13 @@ dist/argosay:
mkdir -p dist
cp test/e2e/images/argosay/v2/argosay dist/

.PHONY: kit
kit:
ifeq ($(shell command -v kit),)
ifeq ($(shell uname),Darwin)
brew tap kitproj/kit --custom-remote https://github.com/kitproj/kit
brew install kit
else
curl -q https://raw.githubusercontent.com/kitproj/kit/main/install.sh | tag=v0.1.8 sh
endif
.PHONY: task
task:
# update this in Nix when upgrading it here
ifneq ($(USE_NIX), true)
npm i -g @go-task/cli@3.30.1
endif


.PHONY: start
ifeq ($(RUN_MODE),local)
ifeq ($(API),true)
Expand Down

0 comments on commit 36d9e60

Please sign in to comment.