Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 46 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,58 @@ workflows:
all:
jobs:
- build
- release:
requires:
- build
filters:
branches:
only: master
- docker:
requires:
- build
filters:
branches:
only: master
jobs:
build:
docker:
- image: golang
environment:
GO111MODULE: "on"
working_directory: /go/src/github.com/raviqqe/liche
steps:
- checkout
- run: |
apt -y update --fix-missing
apt -y install bundler rake
- run: rake deps
- run: rake lint
- run: rake build
- run: rake unit_test
- run: curl -sSL https://codecov.io/bash | bash
- run: rake integration_test
- run: rake install
- run: ./liche --version > version
apt -y install bundler
- run: tools/build.sh
- run: tools/lint.sh
- run: tools/unit_test.sh
- run: tools/integration_test.sh
- persist_to_workspace:
root: .
paths:
- version
- liche
release:
docker:
- image: golang
environment:
GO111MODULE: "on"
steps:
- checkout
- attach_workspace:
at: .
- run: |
version=$(./liche --version)

if git tag -l | grep $version
then
exit 0
fi

git tag $version
git push --tags
curl -sL https://git.io/goreleaser | bash
docker:
docker:
- image: docker:17
Expand All @@ -39,13 +66,15 @@ jobs:
at: .
- run: |
name=$DOCKER_USER/liche
version=$(cat version)
version=$(./liche --version)

if [ $CIRCLE_BRANCH = master -a $version != $(docker run $name --version) ]
if [ $version = $(docker run $name --version) ]
then
docker build -t $name .
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
docker push $name
docker tag $name $name:$version
docker push $name:$version
exit 0
fi

docker build -t $name .
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
docker push $name
docker tag $name $name:$version
docker push $name:$version
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM golang
COPY . /go/src/github.com/raviqqe/liche
RUN CGO_ENABLED=0 GOOS=linux go get /go/src/github.com/raviqqe/liche
FROM golang:1.12
COPY . /src
ENV CGO_ENABLED=0 GO111MODULE=on GOOS=linux
WORKDIR /src
RUN go build -o liche

FROM alpine
RUN apk --no-cache add ca-certificates
COPY --from=0 /go/bin/liche /liche
COPY --from=0 /src/liche /liche
ENTRYPOINT ["/liche"]
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
## DEPRECATION NOTICE

Sorry this project is not actively maintained anymore! 😢 Please consider migrating to one of the alternatives listed below.

### Alternatives

- [muffet](https://github.com/raviqqe/muffet)
- Fast website link checker in Go
- [lychee](https://github.com/lycheeverse/lychee)
- A glorious link checker
- This tool supports testing links both in local files and on websites.
- [hyperlink](https://github.com/untitaker/hyperlink)
- Checks folder of HTML for relative/internal links (no markdown or external websites)

### Why is it not maintained anymore?

It's because we found several problems with the goals of the project and the amount of work it needs.

The goal of this software was originally to check links in Markdown files which are **compiled into HTML files and served via HTTP servers**. But that raises the following problems.

- We cannot test links which do not exist in the Markdown files.
- For example, some markdown-based static site generators generate links at compile time.
- e.g. automatic generation of table of contents
- We cannot test the behaviour of HTTP servers.
- Different HTTP servers handles URLs differently.
- e.g. trailing slashes, inference of page file extensions, ...

It needs a lot of work to support all these different use cases. In short, we need to emulate different Markdown file compilers and HTTP servers as well as web browsers.

### But I still want this...

If you think this software is still valuable for you even in comparison with the alternatives listed above and want it to be maintained, please let us know by posting a new issue.

# liche

[![Circle CI](https://img.shields.io/circleci/project/github/raviqqe/liche.svg?style=flat-square)](https://circleci.com/gh/raviqqe/liche)
Expand All @@ -16,6 +49,8 @@ It checks all `a` and `img` tags in specified files.
go get -u github.com/raviqqe/liche
```

- requires [Go Modules]("https://github.com/golang/go/wiki/Modules#how-to-use-modules")

## Usage

```sh
Expand Down
2 changes: 1 addition & 1 deletion arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type arguments struct {
}

func getArguments(argv []string) (arguments, error) {
args, err := docopt.ParseArgs(fmt.Sprintf(usage, defaultConcurrency), argv, "0.1.1")
args, err := docopt.ParseArgs(fmt.Sprintf(usage, defaultConcurrency), argv, "0.2.0")

if err != nil {
return arguments{}, err
Expand Down
2 changes: 1 addition & 1 deletion file_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"sync"
"time"

"github.com/russross/blackfriday/v2"
"golang.org/x/net/html"
"gopkg.in/russross/blackfriday.v2"
)

type fileChecker struct {
Expand Down
15 changes: 15 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module github.com/raviqqe/liche

go 1.15

require (
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
github.com/fatih/color v1.9.0
github.com/golangci/golangci-lint v1.31.0 // indirect
github.com/kr/text v0.2.0
github.com/russross/blackfriday/v2 v2.0.1
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/valyala/fasthttp v1.16.0
golang.org/x/net v0.0.0-20200904194848-62affa334b73
)
Loading