image_optim_pack 0.9.0-x86-linux → 0.9.1-x86-linux

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae47980cba5b914b563d4dce511017f142c077700407b092dd7438b3207381d4
4
- data.tar.gz: 5bb1afcf954bb61671e801040003cfd9cf93ad2b530cd3933c8cd0654fc845d9
3
+ metadata.gz: b2ce293685e7106f78b30ac9c8f8f54b40797d9359ab041418c7d5d43665e710
4
+ data.tar.gz: 9b35ece0c4917e6f54ca837d0e60df9c154839b6e703972ceb42df366d4f79f4
5
5
  SHA512:
6
- metadata.gz: 628b55b81607067ef8303515fe13e845315ba4ec62e4bf6e3af545ac3a96e5bab4427e885b29537b3e5247a9fbb444ab1fdcf035f44c987fff86aac253f49e26
7
- data.tar.gz: b82e53d5e7250a578c333ef3c7d3a6bd16c7b49a570fa28ef8fec75e55519f988f46cee2f5791eacd15777ba6a3fa1b33dbc1356f413d5d6ee61cbaabed0bf04
6
+ metadata.gz: ddbd4931bdf4faaf06299c47174323fb970a6b9a04cdf5ab9b0b9d2081379a030a1a00ef69208aded50d5a0486e330a7cc06715e58c8bf23e98f79e099ad7f3d
7
+ data.tar.gz: 7fa3f68254b93db6fa1bd4956f3712f49b85940cc463d36fd9de8389e5e3f8b8ca4e4d4249f911cf9d08a0e17d3909a94b9b5cd157d2bbdbb33a130954de4250
@@ -0,0 +1,38 @@
1
+ name: livecheck
2
+ on:
3
+ schedule:
4
+ - cron: 34 5 * * *
5
+ workflow_dispatch:
6
+ inputs:
7
+ retry:
8
+ description: 'Retry attempt'
9
+ required: true
10
+ type: number
11
+ jobs:
12
+ livecheck:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: '3.1'
19
+ bundler-cache: true
20
+ - run: |
21
+ bundle exec script/livecheck || if (( $? == 1 )); then
22
+ exit 1
23
+ else
24
+ echo '::set-output name=RETRY::1'
25
+ fi
26
+ id: livecheck
27
+ - if: ${{ steps.livecheck.outputs.RETRY }}
28
+ env:
29
+ RETRY: ${{ inputs.retry }}
30
+ RETRIES: 10
31
+ GITHUB_TOKEN: ${{ secrets.RETRY_TOKEN }}
32
+ run: |
33
+ if (( ${RETRY:-0} < $RETRIES )); then
34
+ sleep 300
35
+ gh workflow run livecheck --repo $GITHUB_REPOSITORY --ref $GITHUB_REF_NAME -f retry=$(( $RETRY + 1 ))
36
+ else
37
+ exit 1
38
+ fi
data/.rubocop.yml CHANGED
@@ -64,6 +64,8 @@ Style/HashEachMethods:
64
64
  Enabled: true
65
65
 
66
66
  Style/HashSyntax:
67
+ Exclude:
68
+ - script/livecheck
67
69
  EnforcedStyle: hash_rockets
68
70
 
69
71
  Style/HashTransformKeys:
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## unreleased
4
4
 
5
+ ## v0.9.1 (2022-08-29)
6
+
7
+ * libmozjpeg 4.1.1 [@toy](https://github.com/toy)
8
+
5
9
  ## v0.9.0 (2022-06-11)
6
10
 
7
11
  * Add [pngout](http://advsys.net/ken/utils.htm) (since January 2021 license allows redistrubition for freely distributed non-commercial projects) [#24](https://github.com/toy/image_optim_pack/issues/24) [@toy](https://github.com/toy)
data/Makefile CHANGED
@@ -9,7 +9,7 @@ JPEGARCHIVE_VER := 2.2.0
9
9
  JPEGOPTIM_VER := 1.4.7
10
10
  LIBJPEG_VER := 9e
11
11
  LIBLCMS_VER := 2.13
12
- LIBMOZJPEG_VER := 4.0.3
12
+ LIBMOZJPEG_VER := 4.1.1
13
13
  LIBPNG_VER := 1.6.37
14
14
  LIBZ_VER := 1.2.11
15
15
  OPTIPNG_VER := 0.7.7
@@ -206,21 +206,21 @@ ldd-version :; $(ldd) --version
206
206
 
207
207
  define check_exists
208
208
  @test -f $(OUTPUT_DIR)/$1 || \
209
- { printf "$1: $(ANSI_RED)not found$(ANSI_RESET)\n"; exit 1; }
209
+ { printf "%s: $(ANSI_RED)not found$(ANSI_RESET)\n" "$1"; exit 1; }
210
210
  endef
211
211
 
212
212
  define check_version
213
213
  @$(OUTPUT_DIR)/$1 $2 | fgrep -q "$3" || \
214
- { printf "$1: $(ANSI_RED)Expected $3, got $$($(OUTPUT_DIR)/$1 $2)$(ANSI_RESET)\n"; exit 1; }
214
+ { printf "%s: $(ANSI_RED)Expected %s, got %s$(ANSI_RESET)\n" "$1" "$3" "$$($(OUTPUT_DIR)/$1 $2)"; exit 1; }
215
215
  endef
216
216
 
217
217
  define check_arch
218
218
  @file -b $(OUTPUT_DIR)/$1 | fgrep -q '$(ARCH_STRING)' || \
219
- { printf "$1: $(ANSI_RED)Expected $(ARCH_STRING), got $$(file -b $(OUTPUT_DIR)/$1)$(ANSI_RESET)\n"; exit 1; }
219
+ { printf "%s: $(ANSI_RED)Expected %s, got %s$(ANSI_RESET)\n" "$1" "$(ARCH_STRING)" "$$(file -b $(OUTPUT_DIR)/$1)"; exit 1; }
220
220
  endef
221
221
 
222
222
  define check_output
223
- @printf "$1: $(ANSI_GREEN)$3$(ANSI_RESET) / $(ANSI_MAGENTA)$(ARCH_STRING)$(ANSI_RESET)\n"
223
+ @printf "%s: $(ANSI_GREEN)%s$(ANSI_RESET) / $(ANSI_MAGENTA)%s$(ANSI_RESET)\n" "$1" "$3" "$(ARCH_STRING)"
224
224
  endef
225
225
 
226
226
  define check_shlib
@@ -264,13 +264,10 @@ test :
264
264
  $(call check_bin,optipng,--version,$(OPTIPNG_VER))
265
265
  $(call check_bin,oxipng,--version,$(OXIPNG_VER))
266
266
  $(call check_bin,pngcrush,-version 2>&1,$(PNGCRUSH_VER))
267
- $(call check_bin,pngout,2>&1,$(shell perl -mTime::Piece -e 'print Time::Piece->strptime("$(PNGOUT_VER)", "%Y%m%d")->strftime("%b %e %Y")'))
267
+ $(call check_bin,pngout,2>&1 | head -n 1,$(shell perl -mTime::Piece -e 'print Time::Piece->strptime("$(PNGOUT_VER)", "%Y%m%d")->strftime("%b %e %Y")'))
268
268
  $(call check_bin,pngquant,--help,$(PNGQUANT_VER))
269
269
  .PHONY : test
270
270
 
271
- livecheck :; @script/livecheck
272
- .PHONY : livecheck
273
-
274
271
  update-versions :
275
272
  script/livecheck --update
276
273
  make checksum-update
data/README.markdown CHANGED
@@ -1,5 +1,8 @@
1
1
  [![Gem Version](https://img.shields.io/gem/v/image_optim_pack?logo=rubygems)](https://rubygems.org/gems/image_optim_pack)
2
2
  [![Build Status](https://img.shields.io/github/workflow/status/toy/image_optim_pack/check/master?logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/check.yml)
3
+ [![Rubocop](https://img.shields.io/github/workflow/status/toy/image_optim_pack/rubocop/master?label=rubocop&logo=rubocop)](https://github.com/toy/image_optim_pack/actions/workflows/rubocop.yml)
4
+ [![Docker build](https://img.shields.io/github/workflow/status/toy/image_optim_pack/docker-build?label=docker+build&logo=docker)](https://github.com/toy/image_optim_pack/actions/workflows/docker-build.yml)
5
+ [![Livecheck](https://img.shields.io/github/workflow/status/toy/image_optim_pack/livecheck/master?label=livecheck&logo=github)](https://github.com/toy/image_optim_pack/actions/workflows/livecheck.yml)
3
6
  [![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_pack?logo=codeclimate)](https://codeclimate.com/github/toy/image_optim_pack)
4
7
  [![Depfu](https://img.shields.io/depfu/toy/image_optim_pack)](https://depfu.com/github/toy/image_optim_pack)
5
8
  [![Inch CI](https://inch-ci.org/github/toy/image_optim_pack.svg?branch=master)](https://inch-ci.org/github/toy/image_optim_pack)
@@ -10,7 +13,7 @@ Precompiled binaries for [`image_optim`](https://github.com/toy/image_optim).
10
13
 
11
14
  Contains binaries for Mac OS X (>= 10.9, x86\_64) and Linux (i686 and x86\_64).
12
15
 
13
- A test application with latest `image_optim` and `image_optim_pack` is available on heroku: https://iopack.herokuapp.com/.
16
+ A test application with latest `image_optim` and `image_optim_pack` is available on render: https://iopack.onrender.com/.
14
17
 
15
18
  ## Binaries and libraries
16
19
 
@@ -80,7 +83,7 @@ script/run darwin 64 # Build only platforms matching darwin or 64
80
83
  make # Build all tools and copy them to vendor/OS-ARCH for current OS and ARCH, then test
81
84
  make all # same
82
85
 
83
- make livecheck # Check versions
86
+ script/livecheck # Check versions
84
87
  make update-versions # Update versions in Makefile
85
88
 
86
89
  make download # Download archives
data/Vagrantfile CHANGED
@@ -46,6 +46,10 @@ Vagrant.configure('2') do |config|
46
46
 
47
47
  apt-get update
48
48
  apt-get -y dist-upgrade
49
+
50
+ if [ $(lsb_release -r | egrep -o '[0-9]+' | head -1) -lt 18 ]; then
51
+ do-release-upgrade -f DistUpgradeViewNonInteractive
52
+ fi
49
53
  else
50
54
  set -ex
51
55
 
data/checksums.mk CHANGED
@@ -5,7 +5,7 @@ JPEGARCHIVE_SHA256 := 3da16a5abbddd925dee0379aa51d9fe0cba33da0b5703be27c13a2dda3
5
5
  JPEGOPTIM_SHA256 := c52616f2fb8d481315871680f9943b0f58c553d1e0c49a6bd4691a3e66d7e6de
6
6
  LIBJPEG_SHA256 := 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d
7
7
  LIBLCMS_SHA256 := 0c67a5cc144029cfa34647a52809ec399aae488db4258a6a66fba318474a070f
8
- LIBMOZJPEG_SHA256 := 4f22731db2afa14531a5bf2633d8af79ca5cb697a550f678bf43f24e5e409ef0
8
+ LIBMOZJPEG_SHA256 := 66b1b8d6b55d263f35f27f55acaaa3234df2a401232de99b6d099e2bb0a9d196
9
9
  LIBPNG_SHA256 := daeb2620d829575513e35fecc83f0d3791a620b9b93d800b763542ece9390fb4
10
10
  LIBZ_SHA256 := c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
11
11
  OPTIPNG_SHA256 := 4f32f233cef870b3f95d3ad6428bfe4224ef34908f1b42b0badf858216654452
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.9.0'
5
+ s.version = '0.9.1'
6
6
  s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpeg-recompress, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
7
7
  s.homepage = "https://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
data/script/livecheck CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'yaml'
5
4
  require 'uri'
6
5
  require 'net/http'
7
6
  require 'openssl'
@@ -10,6 +9,69 @@ require 'fspath'
10
9
 
11
10
  # Fetch and compare latest tool/library versions
12
11
  class Livecheck
12
+ CONFIG = {
13
+ advancecomp: {
14
+ url: 'https://github.com/amadvance/advancecomp/releases.atom',
15
+ regexp: %r{<id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>},
16
+ },
17
+ gifsicle: {
18
+ url: 'https://www.lcdf.org/gifsicle/',
19
+ regexp: /gifsicle-(\d+(?:\.\d+)*)\.tar\.gz/,
20
+ },
21
+ jhead: {
22
+ url: 'https://www.sentex.ca/~mwandel/jhead/',
23
+ regexp: /jhead-(\d+(?:\.\d+)*)/,
24
+ },
25
+ jpegoptim: {
26
+ url: 'https://github.com/tjko/jpegoptim/tags.atom',
27
+ regexp: %r{<id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>},
28
+ },
29
+ jpegarchive: {
30
+ url: 'https://github.com/danielgtaylor/jpeg-archive/releases.atom',
31
+ regexp: %r{<id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>},
32
+ },
33
+ libjpeg: {
34
+ url: 'https://www.ijg.org/files/',
35
+ regexp: /jpegsrc.v(.*?).tar.gz/,
36
+ },
37
+ liblcms: {
38
+ url: 'https://sourceforge.net/projects/lcms/rss?path=/lcms',
39
+ regexp: %r{/lcms/(\d+(?:\.\d+)*)/},
40
+ },
41
+ libmozjpeg: {
42
+ url: 'https://github.com/mozilla/mozjpeg/releases.atom',
43
+ regexp: %r{<id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>},
44
+ },
45
+ libpng: {
46
+ url: 'https://sourceforge.net/projects/libpng/rss?path=/libpng16',
47
+ regexp: %r{/libpng\d*/(\d+(?:\.\d+)*)/},
48
+ },
49
+ libz: {
50
+ url: 'https://sourceforge.net/projects/libpng/rss?path=/zlib',
51
+ regexp: %r{/zlib/(\d+(?:\.\d+)*)/},
52
+ },
53
+ optipng: {
54
+ url: 'https://sourceforge.net/projects/optipng/rss',
55
+ regexp: %r{/OptiPNG/optipng-(\d+(?:\.\d+)*)/},
56
+ },
57
+ oxipng: {
58
+ url: 'https://github.com/shssoichiro/oxipng/releases.atom',
59
+ regexp: %r{<id>tag:github.com,2008:Repository/\d+/v(\d+(?:\.\d+)*)</id>},
60
+ },
61
+ pngcrush: {
62
+ url: 'https://sourceforge.net/projects/pmt/rss?path=/pngcrush',
63
+ regexp: %r{/pngcrush/(\d+(?:\.\d+)*)/},
64
+ },
65
+ pngout: {
66
+ url: 'http://www.jonof.id.au/kenutils.html',
67
+ regexp: %r{/files/kenutils/pngout-(\d{8})-linux.tar.gz},
68
+ },
69
+ pngquant: {
70
+ url: 'https://pngquant.org/releases.html',
71
+ regexp: %r{<span itemprop='version'>(\d+(?:\.\d+)*)</span>},
72
+ },
73
+ }.freeze
74
+
13
75
  # Commands
14
76
  class Cli
15
77
  VERSION_REGEXP = /^([A-Z]+)_VER *:= *(.*)$/.freeze
@@ -22,11 +84,15 @@ class Livecheck
22
84
  def run
23
85
  dump_changes
24
86
 
25
- return unless @update
26
87
  return unless livechecks.any?(&:changed?)
27
88
 
89
+ exit 1 unless @update
90
+
28
91
  update_changelog
29
92
  update_makefile
93
+ rescue StandardError => e
94
+ warn e
95
+ exit 2
30
96
  end
31
97
 
32
98
  private
@@ -119,8 +185,6 @@ class Livecheck
119
185
  end
120
186
  end
121
187
 
122
- CONFIG = YAML.load(DATA).freeze
123
-
124
188
  attr_reader :name, :current_version
125
189
 
126
190
  def initialize(name, current_version)
@@ -144,7 +208,7 @@ class Livecheck
144
208
  private
145
209
 
146
210
  def config
147
- CONFIG[name] || fail(ArgumentError, "Livecheck for #{name} not defined")
211
+ CONFIG[name.to_sym] || fail(ArgumentError, "Livecheck for #{name} not defined")
148
212
  end
149
213
 
150
214
  def get(url)
@@ -155,9 +219,9 @@ private
155
219
  end
156
220
 
157
221
  def fetch_versions
158
- body = get(config['url'])
222
+ body = get(config[:url])
159
223
 
160
- version_regex = Regexp.new(config['regexp'])
224
+ version_regex = config[:regexp]
161
225
 
162
226
  versions = body.scan(version_regex).map{ |match| Version.new(*match) }.sort
163
227
  fail "No versions found for #{name} in body:\n#{body}" if versions.empty?
@@ -167,50 +231,3 @@ private
167
231
  end
168
232
 
169
233
  Livecheck::Cli.new(ARGV).run
170
-
171
- __END__
172
- advancecomp:
173
- url: https://github.com/amadvance/advancecomp/releases.atom
174
- regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
175
- gifsicle:
176
- url: https://www.lcdf.org/gifsicle/
177
- regexp: gifsicle-(\d+(?:\.\d+)*)\.tar\.gz
178
- jhead:
179
- url: https://www.sentex.ca/~mwandel/jhead/
180
- regexp: jhead-(\d+(?:\.\d+)*)
181
- jpegoptim:
182
- url: https://github.com/tjko/jpegoptim/tags.atom
183
- regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
184
- jpegarchive:
185
- url: https://github.com/danielgtaylor/jpeg-archive/releases.atom
186
- regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
187
- libjpeg:
188
- url: https://www.ijg.org/files/
189
- regexp: jpegsrc.v(.*?).tar.gz
190
- liblcms:
191
- url: https://sourceforge.net/projects/lcms/rss?path=/lcms
192
- regexp: /lcms/(\d+(?:\.\d+)*)/
193
- libmozjpeg:
194
- url: https://github.com/mozilla/mozjpeg/releases.atom
195
- regexp: <id>tag:github.com,2008:Repository/\d+/\D+?(\d+(?:\.\d+)*)</id>
196
- libpng:
197
- url: https://sourceforge.net/projects/libpng/rss?path=/libpng16
198
- regexp: /libpng\d*/(\d+(?:\.\d+)*)/
199
- libz:
200
- url: https://sourceforge.net/projects/libpng/rss?path=/zlib
201
- regexp: /zlib/(\d+(?:\.\d+)*)/
202
- optipng:
203
- url: https://sourceforge.net/projects/optipng/rss
204
- regexp: /OptiPNG/optipng-(\d+(?:\.\d+)*)/
205
- oxipng:
206
- url: https://github.com/shssoichiro/oxipng/releases.atom
207
- regexp: <id>tag:github.com,2008:Repository/\d+/v(\d+(?:\.\d+)*)</id>
208
- pngcrush:
209
- url: https://sourceforge.net/projects/pmt/rss?path=/pngcrush
210
- regexp: /pngcrush/(\d+(?:\.\d+)*)/
211
- pngout:
212
- url: http://www.jonof.id.au/kenutils.html
213
- regexp: /files/kenutils/pngout-(\d{8})-linux.tar.gz
214
- pngquant:
215
- url: https://pngquant.org/releases.html
216
- regexp: <span itemprop='version'>(\d+(?:\.\d+)*)</span>
data/script/run CHANGED
@@ -57,7 +57,9 @@ for vm in $(perl -pe "s/.*?'(.+?-.+?)'\s+=>\s+'.+?\/.+?'.*|.*/\$1/" Vagrantfile
57
57
  passes-filter "$vm" || continue
58
58
  header "$vm"
59
59
 
60
- [[ -n "$NO_UP" ]] || vagrant up "$vm"
60
+ if [[ -z "$NO_UP" ]]; then
61
+ vagrant status "$vm" | grep -q running || vagrant up "$vm"
62
+ fi
61
63
 
62
64
  # create ssh config
63
65
  ssh_config=".vagrant/ssh_config.$vm"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optim_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: x86-linux
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-11 00:00:00.000000000 Z
11
+ date: 2022-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -101,6 +101,7 @@ files:
101
101
  - ".dockerignore"
102
102
  - ".github/workflows/check.yml"
103
103
  - ".github/workflows/docker-build.yml"
104
+ - ".github/workflows/livecheck.yml"
104
105
  - ".github/workflows/rubocop.yml"
105
106
  - ".gitignore"
106
107
  - ".rubocop.yml"
@@ -179,7 +180,7 @@ licenses:
179
180
  metadata:
180
181
  bug_tracker_uri: https://github.com/toy/image_optim_pack/issues
181
182
  changelog_uri: https://github.com/toy/image_optim_pack/blob/master/CHANGELOG.markdown
182
- documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.9.0
183
+ documentation_uri: https://www.rubydoc.info/gems/image_optim_pack/0.9.1
183
184
  source_code_uri: https://github.com/toy/image_optim_pack
184
185
  post_install_message:
185
186
  rdoc_options: []