Skip to content

Commit

Permalink
Merge pull request #50 from AkihiroSuda/dev
Browse files Browse the repository at this point in the history
Makefile: include docs and examples
  • Loading branch information
AkihiroSuda authored Jun 15, 2021
2 parents 296a0aa + 434e230 commit c82737b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Files are installed under $(DESTDIR)/$(PREFIX)
PREFIX ?= /usr/local

GO ?= go

TAR ?= tar
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c82737b

Please sign in to comment.