licensed 3.2.1 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -1
  3. data/docs/sources/cargo.md +19 -0
  4. data/lib/licensed/commands/cache.rb +4 -2
  5. data/lib/licensed/commands/command.rb +5 -2
  6. data/lib/licensed/sources/bundler/missing_specification.rb +10 -7
  7. data/lib/licensed/sources/bundler.rb +6 -2
  8. data/lib/licensed/sources/cargo.rb +70 -0
  9. data/lib/licensed/sources/manifest.rb +17 -22
  10. data/lib/licensed/sources/npm.rb +17 -3
  11. data/lib/licensed/sources.rb +1 -0
  12. data/lib/licensed/version.rb +1 -1
  13. data/licensed.gemspec +1 -1
  14. metadata +4 -32
  15. data/.github/dependabot.yml +0 -19
  16. data/.github/workflows/release.yml +0 -213
  17. data/.github/workflows/test.yml +0 -528
  18. data/.gitignore +0 -57
  19. data/.licensed.yml +0 -7
  20. data/.rubocop.yml +0 -8
  21. data/.ruby-version +0 -1
  22. data/docker/Dockerfile.build-linux +0 -15
  23. data/script/bootstrap +0 -6
  24. data/script/cibuild +0 -7
  25. data/script/console +0 -15
  26. data/script/package +0 -20
  27. data/script/packages/build +0 -95
  28. data/script/packages/linux +0 -57
  29. data/script/packages/mac +0 -41
  30. data/script/setup +0 -5
  31. data/script/source-setup/bower +0 -17
  32. data/script/source-setup/bundler +0 -20
  33. data/script/source-setup/cabal +0 -19
  34. data/script/source-setup/composer +0 -38
  35. data/script/source-setup/git_submodule +0 -39
  36. data/script/source-setup/go +0 -31
  37. data/script/source-setup/mix +0 -19
  38. data/script/source-setup/npm +0 -34
  39. data/script/source-setup/nuget +0 -17
  40. data/script/source-setup/pip +0 -29
  41. data/script/source-setup/pipenv +0 -21
  42. data/script/source-setup/swift +0 -22
  43. data/script/source-setup/yarn +0 -17
  44. data/script/test +0 -16
@@ -1,213 +0,0 @@
1
- name: Build and publish release assets
2
-
3
- on:
4
- release:
5
- types: [created]
6
- workflow_dispatch:
7
- inputs:
8
- version:
9
- description: 'Commit-like version of github/licensed to build package at'
10
- required: true
11
- release_tag:
12
- description: 'Release tag to upload built packages to'
13
- required: false
14
-
15
- jobs:
16
- vars:
17
- name: "Gather values for remainder of steps"
18
- runs-on: ubuntu-latest
19
- outputs:
20
- version: ${{ steps.get_version.outputs.result }}
21
- upload_url: ${{ steps.get_url.outputs.result }}
22
- ref: ${{ steps.get_ref.outputs.result }}
23
- steps:
24
- - id: get_version
25
- name: Get package version
26
- uses: actions/github-script@v4.1
27
- with:
28
- github-token: ${{ secrets.GITHUB_TOKEN }}
29
- result-encoding: string
30
- script: |
31
- let version = "${{ github.event.release.tag_name }}"
32
- if (!version) {
33
- version = "${{ github.event.inputs.version }}"
34
- }
35
-
36
- if (!version) {
37
- throw new Error("unable to find package build version")
38
- }
39
-
40
- return version
41
-
42
- - id: get_url
43
- name: Get release upload url
44
- uses: actions/github-script@v4.1
45
- with:
46
- github-token: ${{ secrets.GITHUB_TOKEN }}
47
- result-encoding: string
48
- script: |
49
- let uploadUrl = "${{ github.event.release.upload_url}}"
50
- const tag = "${{ github.event.inputs.release_tag }}"
51
- if (!uploadUrl && tag) {
52
- const { data: release } = await github.repos.getReleaseByTag({
53
- ...context.repo,
54
- tag
55
- })
56
-
57
- if (!release.upload_url) {
58
- throw new Error("unable to find a release upload url")
59
- }
60
-
61
- uploadUrl = release.upload_url
62
- }
63
-
64
- return uploadUrl
65
-
66
- - id: get_ref
67
- name: Get checkout ref for custom build scripts
68
- uses: actions/github-script@v4.1
69
- with:
70
- github-token: ${{ secrets.GITHUB_TOKEN }}
71
- result-encoding: string
72
- script: |
73
- let ref = "${{ github.event.release.tag_name }}"
74
- if (!ref) {
75
- ref = "${{ github.event.ref }}".replace(/refs\/[^\/]+\//, '')
76
- }
77
-
78
- if (!ref) {
79
- throw new Error("unable to find a ref for action")
80
- }
81
-
82
- return ref
83
-
84
- package_linux:
85
- needs: vars
86
- runs-on: ubuntu-18.04
87
- steps:
88
- - uses: actions/checkout@v2
89
- with:
90
- # checkout at the ref for the action, separate from the target build version
91
- # this allows running build scripts independent of the target version
92
- ref: ${{needs.vars.outputs.ref}}
93
- fetch-depth: 0
94
-
95
- - name: Set up Ruby 2.6
96
- uses: ruby/setup-ruby@v1
97
- with:
98
- ruby-version: 2.6
99
-
100
- - name: Build package
101
- run: script/packages/linux
102
- env:
103
- VERSION: ${{needs.vars.outputs.version}}
104
-
105
- - uses: actions/upload-artifact@v2
106
- with:
107
- name: ${{needs.vars.outputs.version}}-linux
108
- path: pkg/${{needs.vars.outputs.version}}/licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
109
-
110
- package_mac:
111
- needs: vars
112
- runs-on: macOS-latest
113
- steps:
114
- - uses: actions/checkout@v2
115
- with:
116
- # checkout at the ref for the action, separate from the target build version
117
- # this allows running build scripts independent of the target version
118
- ref: ${{needs.vars.outputs.ref}}
119
- fetch-depth: 0
120
-
121
- - name: Set up Ruby 2.6
122
- uses: ruby/setup-ruby@v1
123
- with:
124
- ruby-version: 2.6
125
-
126
- - name: Build package
127
- run: script/packages/mac
128
- env:
129
- VERSION: ${{needs.vars.outputs.version}}
130
-
131
- - uses: actions/upload-artifact@v2
132
- with:
133
- name: ${{needs.vars.outputs.version}}-darwin
134
- path: pkg/${{needs.vars.outputs.version}}/licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
135
-
136
- build_gem:
137
- needs: vars
138
- runs-on: ubuntu-latest
139
- steps:
140
- - uses: actions/checkout@v2
141
- with:
142
- # building a gem doesn't use a different ref from the version input
143
- ref: ${{needs.vars.outputs.version}}
144
-
145
- - name: Set up Ruby 2.6
146
- uses: ruby/setup-ruby@v1
147
- with:
148
- ruby-version: 2.6
149
-
150
- - name: Build gem
151
- run: gem build licensed.gemspec -o licensed-${{needs.vars.outputs.version}}.gem
152
-
153
- - uses: actions/upload-artifact@v2
154
- with:
155
- name: ${{needs.vars.outputs.version}}-gem
156
- path: licensed-${{needs.vars.outputs.version}}.gem
157
-
158
- upload_packages:
159
- if: ${{ needs.vars.outputs.upload_url != '' }}
160
- runs-on: ubuntu-latest
161
- needs: [vars, package_linux, package_mac, build_gem]
162
-
163
- steps:
164
- - name: Set up Ruby 2.6
165
- uses: ruby/setup-ruby@v1
166
- with:
167
- ruby-version: 2.6
168
-
169
- - name: Download linux package
170
- uses: actions/download-artifact@v2
171
- with:
172
- name: ${{needs.vars.outputs.version}}-linux
173
-
174
- - name: Download macOS package
175
- uses: actions/download-artifact@v2
176
- with:
177
- name: ${{needs.vars.outputs.version}}-darwin
178
-
179
- - name: Download gem
180
- uses: actions/download-artifact@v2
181
- with:
182
- name: ${{needs.vars.outputs.version}}-gem
183
-
184
- - name: Publish linux package
185
- uses: actions/upload-release-asset@v1
186
- env:
187
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188
- with:
189
- upload_url: ${{ needs.vars.outputs.upload_url }}
190
- asset_path: ./licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
191
- asset_name: licensed-${{needs.vars.outputs.version}}-linux-x64.tar.gz
192
- asset_content_type: application/gzip
193
-
194
- - name: Publish mac package
195
- uses: actions/upload-release-asset@v1
196
- env:
197
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
198
- with:
199
- upload_url: ${{ needs.vars.outputs.upload_url }}
200
- asset_path: ./licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
201
- asset_name: licensed-${{needs.vars.outputs.version}}-darwin-x64.tar.gz
202
- asset_content_type: application/gzip
203
-
204
- - name: Publish gem to RubyGems
205
- run: |
206
- mkdir -p $HOME/.gem
207
- touch $HOME/.gem/credentials
208
- chmod 0600 $HOME/.gem/credentials
209
- printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
210
- gem push $GEM
211
- env:
212
- RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
213
- GEM: licensed-${{needs.vars.outputs.version}}.gem