Giter Site home page Giter Site logo

sbt-github-plugin's Introduction

sbt-github-plugin

SBT GitHub tasks

Supported Tasks:

  1. Upload SBT artifacts to GitHub

Installing Plugin

Add the following to project/plugins/Plugins.scala:


	import sbt._
	class Plugins(info: ProjectInfo) extends PluginDefinition(info)
	{
	  val sbtGitHubPlugin = "com.github.oxlade39" % "sbt-github-plugin" % "2.0.1"
	}	

N.B. The plugin isn't currently in a public repository

1. Upload SBT artifacts to GitHub

Plugin Class:

com.github.oxlade39.githubuploader.GitHubUploadedArtifacts

Example Usage:


	import sbt._
	import com.github.oxlade39.githubuploader.GitHubUploadedArtifacts
	class MyProject(info: ProjectInfo) extends DefaultProject(info) with GitHubUploadedArtifacts {
		...
	}

reload and update in SBT, then you can use the task git-hub-upload

It does what?

By default git-hub-upload will upload all of your SBT defined artifacts to your remote GitHub download page.

sbt-github-plugin eats its own dog food and uses the GitHubUploadedArtifacts trait to upload artifacts to the downloads page. You can see the definition here

Configuration

git-hub-upload assumes some default behaviour which is standard GitHub practice. It uses JGit to work out your GitHub remote repository, username and GitHub token. All required to upload to GitHub.

The default assumptions are:

  • Your project is set up already tracking your remote GitHub repository
  • You have set up git with your GitHub token as described here
  • Your GitHub repository is being tracked as origin

All of these assumptions are configurable:


import sbt._
import com.github.oxlade39.githubuploader.GitHubUploadedArtifacts
import com.github.oxlade39.githubuploader.SbtGitHubPluginConfig

class SBTGitHubPluginProject(info: ProjectInfo) extends DefaultProject(info) with GitHubUploadedArtifacts {

 override def customConfiguration: Option[SbtGitHubPluginConfig] = 
				Some(SbtGitHubPluginConfig("github", "remote", "remoteRefName"))
}

sbt-github-plugin's People

Contributors

oxlade39 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

thehoangavt

sbt-github-plugin's Issues

Correct HttpClient usage

Nov 29, 2010 9:33:23 PM org.apache.commons.httpclient.SimpleHttpConnectionManager getConnectionWithTimeout
WARNING: SimpleHttpConnectionManager being used incorrectly. Be sure that HttpMethod.releaseConnection() is always called and that only one thread and/or method is using this connection manager at a time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.