Sha256: 77e23b16adfef2eddd81cea5b9610873d2168244d2fcbe946280a11657d8cd78

Contents?: true

Size: 527 Bytes

Versions: 41

Compression:

Stored size: 527 Bytes

Contents

module PkgForge
  ##
  # Add upload methods to Forge
  class Forge
    Contract None => nil
    def push!
      upload_artifact!
    end

    private

    Contract None => String
    def version
      @version ||= `git describe --abbrev=0 --tags`.rstrip
    end

    Contract None => nil
    def upload_artifact!
      run_local [
        'targit',
        '--authfile', '.github',
        '--create',
        '--name', "#{name}.tar.gz",
        "#{org}/#{name}", version, tmpfile(:tarball)
      ]
      nil
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
pkgforge-0.11.0 lib/pkgforge/components/upload.rb
pkgforge-0.10.0 lib/pkgforge/components/upload.rb
pkgforge-0.9.3 lib/pkgforge/components/upload.rb
pkgforge-0.9.2 lib/pkgforge/components/upload.rb
pkgforge-0.9.1 lib/pkgforge/components/upload.rb
pkgforge-0.9.0 lib/pkgforge/components/upload.rb
pkgforge-0.8.4 lib/pkgforge/components/upload.rb
pkgforge-0.8.3 lib/pkgforge/components/upload.rb
pkgforge-0.8.1 lib/pkgforge/components/upload.rb
pkgforge-0.8.0 lib/pkgforge/components/upload.rb
pkgforge-0.6.10 lib/pkgforge/components/upload.rb
pkgforge-0.6.9 lib/pkgforge/components/upload.rb
pkgforge-0.6.8 lib/pkgforge/components/upload.rb
pkgforge-0.6.7 lib/pkgforge/components/upload.rb
pkgforge-0.6.6 lib/pkgforge/components/upload.rb
pkgforge-0.6.5 lib/pkgforge/components/upload.rb
pkgforge-0.6.4 lib/pkgforge/components/upload.rb
pkgforge-0.6.3 lib/pkgforge/components/upload.rb
pkgforge-0.6.2 lib/pkgforge/components/upload.rb
pkgforge-0.6.1 lib/pkgforge/components/upload.rb