Skip to content

Commit

Permalink
Changes to fix versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
briandominick committed Sep 22, 2021
1 parent 93d4c41 commit bdbe0be
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions asciidocsy.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true
# coding: utf-8
lib = File.expand_path("../lib", __FILE__)
lib = File.expand_path("lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "asciidocsy/version"

Expand All @@ -19,7 +19,6 @@ Gem::Specification.new do |spec|

spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(lib|_docs|_data|assets|_sass|LICENSE|_config\.yml|_layouts|_includes)!i) }

spec.add_runtime_dependency "jekyll", "~> 4.2"
spec.add_runtime_dependency "jekyll-asciidoc", "~> 3.0"
spec.add_runtime_dependency "jekyll-liquify", "=0.0.2"
spec.add_runtime_dependency "jekyll-data", "=1.1.1"
Expand Down
3 changes: 2 additions & 1 deletion lib/asciidocsy/data/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
# LATEST TO OLDEST
revisions:

- code: 0.3.0 date: 2021-09-21
- code: 0.3.0
date: 2021-09-21
hash: 050b33f239a0756db37de2dcb7e4219684dc7a44
memo: |
The third minor release of AsciiDocsy refactors the entire theme as a proper Ruby gem!
Expand Down
4 changes: 3 additions & 1 deletion lib/asciidocsy/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
SafeYAML::OPTIONS[:default_mode] = :safe

module AsciiDocsy
releases = YAML.load_file('lib/asciidocsy/data/releases.yml')
spec = Gem::Specification.find_by_name("asciidocsy")
gem_root = spec.gem_dir
releases = YAML.load_file(gem_root + '/lib/asciidocsy/data/releases.yml')
if releases['revisions'][0]['patches']
VERSION = releases['revisions'][0]['patches'][0]['code']
else
Expand Down

0 comments on commit bdbe0be

Please sign in to comment.