Commit b431f126 authored by Rich's avatar Rich
Browse files

CI and packaging

parent dba89b95
......@@ -21,3 +21,8 @@
/tmp/
###############################################################################
/archlinux/
!/archlinux/PKGBUILD
###############################################################################
###############################################################################
image: ruby
###############################################################################
stages:
- test
- publish
###############################################################################
test:
stage : test
script:
- echo "-- Beginning Test --"
- echo "-- Tests not implemented yet --"
###############################################################################
deploy:
rules:
- if: '$CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+$/'
stage: publish
script:
- echo "-- Beginning Publish --"
- test -n "${GEM_HOST_API_KEY}"
- echo "RubyGems API key found!"
- hash rake
- hash ruby
- hash gem
- echo "-- Publishing Gem --"
- rake release
###############################################################################
The MIT License (MIT)
Copyright (c) 2021 Richard Lees, BITServices Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
# Mainteiner: Richard Lees <git0@bitservices.io>
###############################################################################
_gemname=terraform-wrapper
pkgname=ruby-${_gemname}
pkgver=0.0.2
pkgrel=1
pkgdesc="A ruby wrapper for managing Terraform binaries and remote state."
arch=(any)
url="https://gitlab.com/rlees85-ruby/terraform-wrapper/"
license=("MIT")
depends=("ruby")
source=("https://rubygems.org/downloads/${_gemname}-${pkgver}.gem")
noextract=("${_gemname}-${pkgver}.gem")
sha256sums=("")
package() {
cd "${srcdir}"
local _gemdir="$(ruby -e"puts Gem.default_dir")"
gem install --ignore-dependencies --no-user-install -i "${pkgdir}/${_gemdir}" "${_gemname}-${pkgver}.gem"
}
###############################################################################
......@@ -4,7 +4,7 @@ module TerraformWrapper
###############################################################################
VERSION = "0.0.1"
VERSION = "0.0.2"
###############################################################################
......
......@@ -9,26 +9,25 @@ require_relative "lib/terraform-wrapper/version"
###############################################################################
Gem::Specification.new do |spec|
spec.name = "terraform-wrapper"
spec.version = TerraformWrapper::VERSION
spec.authors = ["Richard Lees"]
spec.email = ["git0@bitservices.io"]
spec.name = "terraform-wrapper"
spec.version = TerraformWrapper::VERSION
spec.authors = ["Richard Lees"]
spec.email = ["git0@bitservices.io"]
spec.summary = "A ruby wrapper for managing Terraform binaries and remote state."
spec.description = "A ruby wrapper for managing Terraform binaries and remote state. Each Terraform command (plan, apply, etc) is wrapped so that the correct binary is used and remote state referenced."
#spec.homepage = "TODO: Put your gem's website or public repo URL here."
#spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
spec.summary = "A ruby wrapper for managing Terraform binaries and remote state."
spec.description = "A ruby wrapper for managing Terraform binaries and remote state. Each Terraform command (plan, apply, etc) is wrapped so that the correct binary is used and remote state referenced."
spec.homepage = "https://gitlab.com/rlees85-ruby/terraform-wrapper/"
spec.license = "MIT"
#spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
#spec.metadata["homepage_uri"] = spec.homepage
#spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
#spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:archlinux|test|spec|features)/}) or f.match(%r{\Aavatar(?:_group)?\.png\z}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment