diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 758383acb66..c11b025c7cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,22 +8,6 @@ on: pull_request: jobs: - project: - name: Project Checks - runs-on: ubuntu-20.04 - timeout-minutes: 20 - steps: - - uses: actions/setup-go@v2 - with: - go-version: 1.16.x - - uses: actions/checkout@v2 - with: - fetch-depth: 25 - - name: "Check DCO sign" - run: | - go get -u github.com/vbatts/git-validation - ./hack/validate-dco.sh - golangci-lint: runs-on: ubuntu-20.04 timeout-minutes: 20 diff --git a/Makefile b/Makefile index bc70329b4be..2105def9438 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# Files are installed under $(DESTDIR)/$(PREFIX) +PREFIX ?= /usr/local + GO ?= go TAR ?= tar @@ -19,6 +22,9 @@ binaries: \ _output/bin/nerdctl.lima \ _output/share/lima/lima-guestagent.Linux-x86_64 \ _output/share/lima/lima-guestagent.Linux-aarch64 + mkdir -p _output/share/doc/lima + cp -aL README.md LICENSE docs examples _output/share/doc/lima + echo $(VERSION) > _output/share/doc/lima/VERSION .PHONY: _output/bin/lima _output/bin/lima: @@ -46,8 +52,17 @@ _output/share/lima/lima-guestagent.Linux-aarch64: .PHONY: install install: - cp -av _output/* /usr/local/ - if [[ $(shell uname -s ) != Linux && ! -e /usr/local/bin/nerdctl ]]; then ln -sf nerdctl.lima /usr/local/bin/nerdctl; fi + cp -av _output/* "$(DESTDIR)/$(PREFIX)/" + if [[ $(shell uname -s ) != Linux && ! -e "$(DESTDIR)/$(PREFIX)/bin/nerdctl" ]]; then ln -sf nerdctl.lima "$(DESTDIR)/$(PREFIX)/bin/nerdctl"; fi + +.PHONY: uninstall +uninstall: + rm -rf \ + "$(DESTDIR)/$(PREFIX)/bin/lima" \ + "$(DESTDIR)/$(PREFIX)/bin/limactl" \ + "$(DESTDIR)/$(PREFIX)/bin/nerdctl.lima" \ + "$(DESTDIR)/$(PREFIX)/share/lima" "$(DESTDIR)/$(PREFIX)/share/doc/lima" + # TODO: remove $(DESTDIR)/$(PREFIX)/bin/nerdctl only when it is a symlink to nerdctl.lima .PHONY: clean clean: