...

Text file src/github.com/alecthomas/chroma/v2/Makefile

Documentation: github.com/alecthomas/chroma/v2

     1.PHONY: chromad upload all
     2
     3VERSION ?= $(shell git describe --tags --dirty  --always)
     4export GOOS ?= linux
     5export GOARCH ?= amd64
     6
     7all: README.md tokentype_string.go
     8
     9README.md: lexers/*/*.go
    10	./table.py
    11
    12tokentype_string.go: types.go
    13	go generate
    14
    15chromad:
    16	rm -f chromad
    17	esbuild --bundle cmd/chromad/static/index.js --minify --outfile=cmd/chromad/static/index.min.js
    18	esbuild --bundle cmd/chromad/static/index.css --minify --outfile=cmd/chromad/static/index.min.css
    19	(export CGOENABLED=0 ; cd ./cmd/chromad && go build -ldflags="-X 'main.version=$(VERSION)'" -o ../../chromad .)
    20
    21upload: chromad
    22	scp chromad root@swapoff.org: && \
    23		ssh root@swapoff.org 'install -m755 ./chromad /srv/http/swapoff.org/bin && service chromad restart'

View as plain text