Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apache/skywalking-eyes
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3ea9df1
Choose a base ref
...
head repository: apache/skywalking-eyes
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c4b6b31
Choose a head ref
  • 11 commits
  • 121 files changed
  • 5 contributors

Commits on Jan 6, 2025

  1. Copy the full SHA
    1516971 View commit details

Commits on Jan 10, 2025

  1. docs: uodate readme.md (#187)

    yuluo-yx authored Jan 10, 2025
    Copy the full SHA
    69f34ab View commit details

Commits on Feb 8, 2025

  1. Bump up to go 1.23 and clean up Docker images (#188)

    kezhenxu94 authored Feb 8, 2025
    Copy the full SHA
    966951c View commit details
  2. Bump github.com/go-git/go-git/v5 from 5.8.0 to 5.13.0 (#189)

    dependabot[bot] authored Feb 8, 2025
    Copy the full SHA
    7965255 View commit details

Commits on Feb 9, 2025

  1. Fix global gitignore is not respected, move licenses to release phase (

    kezhenxu94 authored Feb 9, 2025
    Copy the full SHA
    8b1d66c View commit details
  2. Remove change logs and link to releases page instead (#192)

    kezhenxu94 authored Feb 9, 2025
    Copy the full SHA
    5c5b974 View commit details

Commits on Feb 10, 2025

  1. Add support for Elixir (#193)

    kezhenxu94 authored Feb 10, 2025
    Copy the full SHA
    5042f7f View commit details

Commits on Feb 12, 2025

  1. Fix twitter/x badge (#194)

    kezhenxu94 authored Feb 12, 2025
    Copy the full SHA
    477772b View commit details

Commits on Mar 20, 2025

  1. Record the use of SkyWalking Eyes Docker Image under PowerShell 7 (#196)

    linghengqian authored Mar 20, 2025
    Copy the full SHA
    1aa2bb0 View commit details

Commits on Mar 21, 2025

  1. Bump up some GitHub Actions (#197)

    kezhenxu94 authored Mar 21, 2025
    Copy the full SHA
    4021a39 View commit details
  2. Bump golang.org/x/net from 0.33.0 to 0.36.0 (#195)

    * Bump golang.org/x/net from 0.33.0 to 0.36.0
    
    Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.36.0.
    - [Commits](golang/net@v0.33.0...v0.36.0)
    
    ---
    updated-dependencies:
    - dependency-name: golang.org/x/net
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * go mod tidy
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
    dependabot[bot] and kezhenxu94 authored Mar 21, 2025
    Copy the full SHA
    c4b6b31 View commit details
Showing with 407 additions and 7,386 deletions.
  1. +2 −2 .github/workflows/license-eye-check.yaml
  2. +2 −2 .github/workflows/publish-docker.yaml
  3. +3 −0 .gitignore
  4. +9 −12 .golangci.yml
  5. +18 −16 .licenserc.yaml
  6. +1 −145 CHANGES.md
  7. +1 −9 Dockerfile
  8. +1 −0 LICENSE
  9. +9 −3 Makefile
  10. +39 −2 README.md
  11. +2 −2 action.yml
  12. +1 −0 assets/languages.yaml
  13. +1 −1 commands/deps_check.go
  14. +8 −6 commands/deps_resolve.go
  15. +1 −1 commands/header_check.go
  16. +1 −1 commands/header_fix.go
  17. +1 −1 commands/root.go
  18. +2 −2 dependency/action.yml
  19. +0 −260 dist/LICENSE
  20. +0 −202 dist/licenses/license-cloud.google.com-go-bigquery.txt
  21. +0 −202 dist/licenses/license-cloud.google.com-go-datastore.txt
  22. +0 −202 dist/licenses/license-cloud.google.com-go-pubsub.txt
  23. +0 −202 dist/licenses/license-cloud.google.com-go-storage.txt
  24. +0 −202 dist/licenses/license-cloud.google.com-go.txt
  25. +0 −27 dist/licenses/license-dmitri.shuralyov.com-gpu-mtl.txt
  26. +0 −21 dist/licenses/license-github.com-BurntSushi-toml.txt
  27. +0 −42 dist/licenses/license-github.com-BurntSushi-xgb.txt
  28. +0 −19 dist/licenses/license-github.com-Masterminds-semver-v3.txt
  29. +0 −19 dist/licenses/license-github.com-Masterminds-sprig-v3.txt
  30. +0 −22 dist/licenses/license-github.com-bmatcuk-doublestar-v2.txt
  31. +0 −202 dist/licenses/license-github.com-census-instrumentation-opencensus-proto.txt
  32. +0 −21 dist/licenses/license-github.com-chzyer-logex.txt
  33. +0 −22 dist/licenses/license-github.com-chzyer-readline.txt
  34. +0 −21 dist/licenses/license-github.com-chzyer-test.txt
  35. +0 −22 dist/licenses/license-github.com-client9-misspell.txt
  36. +0 −201 dist/licenses/license-github.com-cncf-udpa-go.txt
  37. +0 −21 dist/licenses/license-github.com-cpuguy83-go-md2man-v2.txt
  38. +0 −15 dist/licenses/license-github.com-davecgh-go-spew.txt
  39. +0 −201 dist/licenses/license-github.com-envoyproxy-go-control-plane.txt
  40. +0 −202 dist/licenses/license-github.com-envoyproxy-protoc-gen-validate.txt
  41. +0 −27 dist/licenses/license-github.com-go-gl-glfw-v3.3-glfw.txt
  42. +0 −27 dist/licenses/license-github.com-go-gl-glfw.txt
  43. +0 −191 dist/licenses/license-github.com-golang-glog.txt
  44. +0 −191 dist/licenses/license-github.com-golang-groupcache.txt
  45. +0 −202 dist/licenses/license-github.com-golang-mock.txt
  46. +0 −28 dist/licenses/license-github.com-golang-protobuf.txt
  47. +0 −202 dist/licenses/license-github.com-google-btree.txt
  48. +0 −27 dist/licenses/license-github.com-google-go-cmp.txt
  49. +0 −27 dist/licenses/license-github.com-google-go-github-v33.txt
  50. +0 −27 dist/licenses/license-github.com-google-go-querystring.txt
  51. +0 −27 dist/licenses/license-github.com-google-licensecheck.txt
  52. +0 −202 dist/licenses/license-github.com-google-martian-v3.txt
  53. +0 −202 dist/licenses/license-github.com-google-martian.txt
  54. +0 −202 dist/licenses/license-github.com-google-pprof.txt
  55. +0 −202 dist/licenses/license-github.com-google-renameio.txt
  56. +0 −27 dist/licenses/license-github.com-google-uuid.txt
  57. +0 −27 dist/licenses/license-github.com-googleapis-gax-go-v2.txt
  58. +0 −362 dist/licenses/license-github.com-hashicorp-golang-lru.txt
  59. +0 −22 dist/licenses/license-github.com-huandu-xstrings.txt
  60. +0 −27 dist/licenses/license-github.com-ianlancetaylor-demangle.txt
  61. +0 −28 dist/licenses/license-github.com-imdario-mergo.txt
  62. +0 −13 dist/licenses/license-github.com-inconshreveable-mousetrap.txt
  63. +0 −20 dist/licenses/license-github.com-jstemmer-go-junit-report.txt
  64. +0 −20 dist/licenses/license-github.com-kisielk-gotool.txt
  65. +0 −21 dist/licenses/license-github.com-kr-pretty.txt
  66. +0 −23 dist/licenses/license-github.com-kr-pty.txt
  67. +0 −19 dist/licenses/license-github.com-kr-text.txt
  68. +0 −21 dist/licenses/license-github.com-mitchellh-copystructure.txt
  69. +0 −21 dist/licenses/license-github.com-mitchellh-reflectwalk.txt
  70. +0 −27 dist/licenses/license-github.com-pmezard-go-difflib.txt
  71. +0 −201 dist/licenses/license-github.com-prometheus-client-model.txt
  72. +0 −27 dist/licenses/license-github.com-rogpeppe-go-internal.txt
  73. +0 −29 dist/licenses/license-github.com-russross-blackfriday-v2.txt
  74. +0 −45 dist/licenses/license-github.com-shopspring-decimal.txt
  75. +0 −21 dist/licenses/license-github.com-sirupsen-logrus.txt
  76. +0 −21 dist/licenses/license-github.com-spf13-cast.txt
  77. +0 −174 dist/licenses/license-github.com-spf13-cobra.txt
  78. +0 −28 dist/licenses/license-github.com-spf13-pflag.txt
  79. +0 −22 dist/licenses/license-github.com-stretchr-objx.txt
  80. +0 −21 dist/licenses/license-github.com-stretchr-testify.txt
  81. +0 −21 dist/licenses/license-github.com-yuin-goldmark.txt
  82. +0 −202 dist/licenses/license-go.opencensus.io.txt
  83. +0 −27 dist/licenses/license-golang.org-x-crypto.txt
  84. +0 −27 dist/licenses/license-golang.org-x-exp.txt
  85. +0 −27 dist/licenses/license-golang.org-x-image.txt
  86. +0 −27 dist/licenses/license-golang.org-x-lint.txt
  87. +0 −27 dist/licenses/license-golang.org-x-mobile.txt
  88. +0 −27 dist/licenses/license-golang.org-x-mod.txt
  89. +0 −27 dist/licenses/license-golang.org-x-net.txt
  90. +0 −27 dist/licenses/license-golang.org-x-oauth2.txt
  91. +0 −27 dist/licenses/license-golang.org-x-sync.txt
  92. +0 −27 dist/licenses/license-golang.org-x-sys.txt
  93. +0 −27 dist/licenses/license-golang.org-x-term.txt
  94. +0 −27 dist/licenses/license-golang.org-x-text.txt
  95. +0 −27 dist/licenses/license-golang.org-x-time.txt
  96. +0 −27 dist/licenses/license-golang.org-x-tools.txt
  97. +0 −27 dist/licenses/license-golang.org-x-xerrors.txt
  98. +0 −27 dist/licenses/license-google.golang.org-api.txt
  99. +0 −202 dist/licenses/license-google.golang.org-appengine.txt
  100. +0 −202 dist/licenses/license-google.golang.org-genproto.txt
  101. +0 −202 dist/licenses/license-google.golang.org-grpc.txt
  102. +0 −27 dist/licenses/license-google.golang.org-protobuf.txt
  103. +0 −25 dist/licenses/license-gopkg.in-check.v1.txt
  104. +0 −26 dist/licenses/license-gopkg.in-errgo.v2.txt
  105. +0 −201 dist/licenses/license-gopkg.in-yaml.v2.txt
  106. +0 −50 dist/licenses/license-gopkg.in-yaml.v3.txt
  107. +0 −20 dist/licenses/license-honnef.co-go-tools.txt
  108. +0 −27 dist/licenses/license-rsc.io-binaryregexp.txt
  109. +0 −27 dist/licenses/license-rsc.io-quote-v3.txt
  110. +0 −27 dist/licenses/license-rsc.io-sampler.txt
  111. +4 −6 docs/How-to-release.md
  112. +32 −0 examples/golang/Dockerfile
  113. +29 −0 examples/java/Dockerfile
  114. +26 −0 examples/nodejs/Dockerfile
  115. +20 −16 go.mod
  116. +55 −57 go.sum
  117. +2 −2 header/action.yml
  118. +7 −1 pkg/deps/jar.go
  119. +1 −2 pkg/deps/maven.go
  120. +108 −0 pkg/gitignore/dir.go
  121. +21 −7 pkg/header/check.go
4 changes: 2 additions & 2 deletions .github/workflows/license-eye-check.yaml
Original file line number Diff line number Diff line change
@@ -28,11 +28,11 @@ jobs:
name: Build LicenseEye
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.23

- name: Lint Codes
run: make lint
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
@@ -36,10 +36,10 @@ jobs:
env:
VERSION: ${{ github.sha }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cache/go-build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -24,3 +24,6 @@ coverage.txt

target/
*.jar

dist/licenses
dist/LICENSE
21 changes: 9 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,8 @@ run:

linters-settings:
govet:
check-shadowing: true
enable:
- shadow
revive:
min-confidence: 0
gocyclo:
@@ -33,10 +34,11 @@ linters-settings:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-messages:
fmt: "logging is allowed only by logutils.Log"
rules:
main:
deny:
- pkg: "fmt"
desc: "logging is allowed only by logutils.Log"
misspell:
locale: US
ignore-words:
@@ -94,11 +96,9 @@ linters-settings:
linters:
enable:
- bodyclose
- deadcode
- depguard
- errcheck
- dogsled
- dupl
- errcheck
- funlen
- goconst
- gocritic
@@ -114,16 +114,13 @@ linters:
- misspell
- nakedret
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace

service:
golangci-lint-version: 1.20.x
golangci-lint-version: 1.63.4
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
34 changes: 18 additions & 16 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -19,7 +19,8 @@ header: # `header` section is configurations for source codes license header.
license:
spdx-id: Apache-2.0 # the spdx id of the license, it's convenient when your license is standard SPDX license.
copyright-owner: Apache Software Foundation # the copyright owner to replace the [owner] in the `spdx-id` template.
content: | # `license` will be used as the content when `fix` command needs to insert a license header.
content:
| # `license` will be used as the content when `fix` command needs to insert a license header.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
@@ -57,23 +58,24 @@ header: # `header` section is configurations for source codes license header.
under the License.
paths: # `paths` are the path list that will be checked (and fixed) by license-eye, default is ['**'].
- '**'
- "**"

paths-ignore: # `paths-ignore` are the path list that will be ignored by license-eye.
- 'dist'
- 'licenses'
- '**/*.md'
- '**/testdata/**'
- '**/go.mod'
- '**/go.sum'
- 'LICENSE'
- 'NOTICE'
- '**/assets/header-templates/**'
- '**/assets/lcs-templates/**'
- '**/assets/languages.yaml'
- '**/assets/default-license.tpl'
- '**/assets/assets.gen.go'
- 'docs/**.svg'
- "dist"
- "licenses"
- "**/*.md"
- "**/testdata/**"
- "**/go.mod"
- "**/go.sum"
- "LICENSE"
- "NOTICE"
- "**/assets/header-templates/**"
- "**/assets/lcs-templates/**"
- "**/assets/languages.yaml"
- "**/assets/default-license.tpl"
- "**/assets/assets.gen.go"
- "docs/**.svg"
- "pkg/gitignore/dir.go"

comment: on-failure # on what condition license-eye will comment on the pull request, `on-failure`, `always`, `never`.

146 changes: 1 addition & 145 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,145 +1 @@
## 0.6.0

* Add instructions to fix header issues in markdown comment.
* Add Eclipse Foundation specific Apache 2.0 license header.
* Add support for OPA policy files, protobuf.
* Add weak-compatible check to dependency check.

## 0.5.0

* feat(header templates): add support for AGPL-3.0 by @elijaholmos in https://github.com/apache/skywalking-eyes/pull/125
* Upgrade go version to 1.18 by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/126
* Add MulanPSL-2.0 support. by @jmjoy in https://github.com/apache/skywalking-eyes/pull/127
* New Header Template: GPL-3.0-or-later by @ddlees in https://github.com/apache/skywalking-eyes/pull/128
* Update README.md by @rovast in https://github.com/apache/skywalking-eyes/pull/129
* Add more `.env.[mode]` support for VueJS project by @rovast in https://github.com/apache/skywalking-eyes/pull/130
* Docker Multiple Architecture Support :fixes#9089 by @mohammedtabish0 in https://github.com/apache/skywalking-eyes/pull/132
* Polish maven test for convenient debug by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/134
* feat: list files by git when possible by @tisonkun in https://github.com/apache/skywalking-eyes/pull/133
* Switch to npm ci for reliable builds by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/135
* Fix optional dependencies are not excluded by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/136
* Fix exclude not work for transitive dependencies and add recursive config by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/137
* Add some tests for maven resovler by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/138
* feat(header-fix): add Svelte support by @elijaholmos in https://github.com/apache/skywalking-eyes/pull/139
* dep: do not write license files if they already exist by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/140
* fix: not ignore *.txt to make sure files like CMakeLists.txt can be checked by @acelyc111 in https://github.com/apache/skywalking-eyes/pull/141
* fix license header normalizer by @xiaoyawei in https://github.com/apache/skywalking-eyes/pull/142
* Substitute variables in license content for header command by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/143
* Correct indent in Apache-2.0 template by @tisonkun in https://github.com/apache/skywalking-eyes/pull/144
* Add copyright-year configuration by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/145
* dep/maven: use output file to store the dep tree for cleaner result by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/146
* dep/maven: resolve dependencies before analysis by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/147
* gha: switch to composite running mode and set up cache by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/149
* Fix GitHub Actions wrong path by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/151
* Normalize license for cargo. by @jmjoy in https://github.com/apache/skywalking-eyes/pull/153
* Remove space characters in license for cargo. by @jmjoy in https://github.com/apache/skywalking-eyes/pull/154
* Bump up dependencies to fix CVE by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/155
* Bump up GHA to depress warnings by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/156
* Leverage the built-in cache in setup-go@v4 by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/157
* Dependencies check should report unknown licneses by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/158
* Fix wrong indentation in doc by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/159
* Add EPL-2.0 header template by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/160
* Dependency resolve with default template and specified output of license by @crholm in https://github.com/apache/skywalking-eyes/pull/163
* Bump up go git to support .gitconfig user path by @kezhenxu94 in https://github.com/apache/skywalking-eyes/pull/164

## 0.4.0
- Reorganize GHA by header and dependency. (#123)
- Add rust cargo support for dep command. (#121)
- Support license expression in dep check. (#120)
- Prune npm packages before listing all dependencies (#119)
- Add support for multiple licenses in the header config section (#118)
- Add `excludes` to `license resolve` config (#117)
- maven: set `group:artifact` as dependency name and extend functions in summary template (#116)
- Stablize summary context to perform consistant output (#115)
- Add custom license urls for identification (#114)
- Lazy initialize GitHub client for comment (#111)
- Make license identifying threshold configurable (#110)
- Use Google's licensecheck to identify licenses (#107)
- dep: short circuit if user declare dep license (#108)

## 0.3.0

- Dependency License
- Fix license check in go library testify (#93)

- License Header
- `fix` command supports more languages:
- Add comment style for cmake language (#86)
- Add comment style for hcl (#89)
- Add mpl-2.0 header template (#87)
- Support fix license header for tcl files (#102)
- Add python docstring comment style (#100)
- Add comment style for makefile & editorconfig (#90)
- Support config license header comment style (#97)
- Trim leading and trailing newlines before rewrite license header cotent (#94)
- Replace already existing license header based on pattern (#98)
- [docs] add the usage for config the license header comment style (#99)

- Project
- Obtain default github token in github actions (#82)
- Add tests for bare spdx license header content (#92)
- Add github action step summary for better experience (#104)
- Adds an option to the action to run in `fix` mode (#84)
- Provide `--summary` flag to generate the license summary file (#103)
- Add .exe suffix to windows binary (#101)
- Fix wrong file path and exclude binary files in src release (#81)
- Use t.tempdir to create temporary test directory (#95)
- Config: fix incorrect log message (#91)
- [docs] correct spelling mistakes (#96)

## 0.2.0

- Dependency License
- Support resolving go.mod for Go
- Support resolving pom.xml for maven (#50)
- Support resolving jars' licenses (#53)
- Support resolving npm dependencies' licenses (#48)
- Support saving dependencies' licenses (#69)
- Add `dependency check` to check dependencies license compatibilities (#58)

- License Header
- `fix` command supports more languages:
- Add support for plantuml (#42)
- Add support for PHP (#40)
- Add support for Twig template language (#39)
- Add support for Smarty template language (#38)
- Add support for MatLab files (#37)
- Add support for TypeScript language files (#73)
- Add support for nextflow files (#65)
- Add support for perl files (#63)
- Add support for ini extension (#24)
- Add support for R files (#64)
- Add support for .rst files and allow fixing header of a single file (#25)
- Add support for Rust files (#29)
- Add support for bat files (#32)
- Remove .tsx from XML language extensions
- Honor Python's coding directive (#68)
- Fix file extension conflict between RenderScript and Rust (#66)
- Add comment type to cython declaration (#62)
- header fix: respect user configured license content (#60)
- Expose `license-location-threshold` as config item (#34)
- Fix infinite recursive calls when containing symbolic files (#33)
- defect: avoid crash when no comment style is found (#23)

- Project
- Enhance license identification (#79)
- Support installing via go install (#76)
- Speed up the initialization phase (#75)
- Resolve absolute path in `.gitignore` to relative path (#67)
- Reduce img size and add npm env (#59)
- Make the config file and log level in GitHub Action configurable (#56, #57)
- doc: add a PlantUML activity diagram of header fixing mechanism (#41)
- Fix bug: license file is not found but reported message is nil (#49)
- Add all well-known licenses and polish normalizers (#47)
- Fix compatibility issues in Windows (#44)
- feature: add reasonable default config to allow running in a new repo without copying config file (#28)
- chore: only build linux binary when building inside docker (#26)
- chore: upgrade to go 1.16 and remove `go-bindata` (#22)
- Add documentation about how to use via docker image (#20)

## 0.1.0

- License Header
+ Add `check` and `fix` command.
+ `check` results can be reported to pull request as comments.
+ `fix` suggestions can be filed on pull request as edit suggestions.
Check the [release notes](https://github.com/apache/skywalking-eyes/releases) for detailed change logs.
10 changes: 1 addition & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -15,9 +15,7 @@
# specific language governing permissions and limitations
# under the License.

# TODO: minimize the docker image size, now 524MB !!!

FROM golang:1.18-alpine AS build
FROM golang:1.23-alpine AS build

WORKDIR /license-eye

@@ -29,12 +27,6 @@ FROM alpine:3 AS bin

COPY --from=build /license-eye/bin/linux/license-eye /bin/license-eye

# Go
COPY --from=build /usr/local/go/bin/go /usr/local/go/bin/go
ENV PATH="/usr/local/go/bin:$PATH"
RUN apk add --no-cache bash gcc musl-dev npm cargo
# Go

WORKDIR /github/workspace/

ENTRYPOINT ["/bin/license-eye"]
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -228,3 +228,4 @@ The text of each license is the standard Apache 2.0 license.

pkg/deps/testdata/maven/mvnw files from https://github.com/apache/maven-wrapper Apache 2.0
pkg/deps/testdata/maven/.mvn/wrapper/maven-wrapper.properties from https://github.com/apache/maven-wrapper Apache 2.0
pkg/gitignore/dir.go from https://github.com/go-git/go-git/blob/db681b472344540816df80736860c6af23e8cf94/plumbing/format/gitignore/dir.go Apache 2.0
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ RELEASE_SRC = skywalking-$(PROJECT)-$(VERSION)-src
all: clean lint license test build

$(GO_LINT):
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v1.49.0
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GO_PATH)/bin v1.63.4

.PHONY: lint
lint: $(GO_LINT)
@@ -56,6 +56,7 @@ fix-lint: $(GO_LINT)
.PHONY: license
license: clean
$(GO) run cmd/$(PROJECT)/main.go header check
$(GO) run cmd/$(PROJECT)/main.go dependency check

.PHONY: test
test: clean
@@ -74,7 +75,7 @@ build: windows linux darwin

.PHONY: docker
docker:
docker build . -t $(HUB)/$(PROJECT):$(VERSION) -t $(HUB)/$(PROJECT):latest
docker build --no-cache . -t $(HUB)/$(PROJECT):$(VERSION) -t $(HUB)/$(PROJECT):latest

.PHONY: docker-push
docker-push:
@@ -115,7 +116,12 @@ release-src: clean
mv $(RELEASE_SRC)/$(RELEASE_SRC).tgz $(RELEASE_SRC).tgz
-rm -rf "$(RELEASE_SRC)"

release-bin: build
.PHONY: release-license-bin
release-license-bin: clean
$(GO) run cmd/$(PROJECT)/main.go dependency resolve --summary dist/LICENSE.tpl --output dist/licenses/ || \
(echo "Error: Failed to resolve license dependencies automatically. Please check licenses manually." && exit 1)

release-bin: release-license-bin build
-mkdir $(RELEASE_BIN)
-cp -R bin $(RELEASE_BIN)
-cp -R dist/* $(RELEASE_BIN)
Loading