initial
This commit is contained in:
commit
b84034207b
128
main.go
Normal file
128
main.go
Normal file
@ -0,0 +1,128 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
|
||||
app.Commands = []cli.Command{
|
||||
{
|
||||
Name: "upload",
|
||||
Aliases: []string{"u"},
|
||||
Usage: "Upload a directory's manifests",
|
||||
Action: func(c *cli.Context) error {
|
||||
fmt.Println(getManifests())
|
||||
return nil
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
err := app.Run(os.Args)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func getManifests() []string {
|
||||
globs := make([]string, 66) // Increment when adding new manifest types
|
||||
|
||||
// Hackage
|
||||
globs = append(globs, "*.cabal")
|
||||
// npm
|
||||
globs = append(globs, "package.json")
|
||||
globs = append(globs, "package-lock.json")
|
||||
globs = append(globs, "npm-shrinkwrap.json")
|
||||
globs = append(globs, "yarn.lock")
|
||||
// Maven
|
||||
globs = append(globs, "pom.xml")
|
||||
globs = append(globs, "ivy.xml")
|
||||
globs = append(globs, "build.gradle")
|
||||
// RubyGems
|
||||
globs = append(globs, "Gemfile")
|
||||
globs = append(globs, "Gemfile.lock")
|
||||
globs = append(globs, "gems.rb")
|
||||
globs = append(globs, "gems.locked")
|
||||
globs = append(globs, "*.gemspec")
|
||||
// Packagist
|
||||
globs = append(globs, "composer.json")
|
||||
globs = append(globs, "composer.lock")
|
||||
// PyPi
|
||||
globs = append(globs, "setup.py")
|
||||
globs = append(globs, "req*.txt")
|
||||
globs = append(globs, "req*.pip")
|
||||
globs = append(globs, "requirements/*.txt")
|
||||
globs = append(globs, "requirements/*.pip")
|
||||
globs = append(globs, "Pipfile")
|
||||
globs = append(globs, "Pipfile.lock")
|
||||
// Nuget
|
||||
globs = append(globs, "packages.config")
|
||||
globs = append(globs, "Project.json")
|
||||
globs = append(globs, "Project.lock.json")
|
||||
globs = append(globs, "*.nuspec")
|
||||
globs = append(globs, "paket.lock")
|
||||
globs = append(globs, "*.csproj")
|
||||
// Bower
|
||||
globs = append(globs, "bower.json")
|
||||
// CPAN
|
||||
globs = append(globs, "META.json")
|
||||
globs = append(globs, "META.yml")
|
||||
// CocoaPods
|
||||
globs = append(globs, "Podfile")
|
||||
globs = append(globs, "Podfile.lock")
|
||||
globs = append(globs, "*.podspec")
|
||||
// Clojars
|
||||
globs = append(globs, "project.clj")
|
||||
// Meteor
|
||||
globs = append(globs, "versions.json")
|
||||
// CRAN
|
||||
globs = append(globs, "DESCRIPTION")
|
||||
// Cargo
|
||||
globs = append(globs, "Cargo.toml")
|
||||
globs = append(globs, "Cargo.lock")
|
||||
// Hex
|
||||
globs = append(globs, "mix.exs")
|
||||
globs = append(globs, "mix.lock")
|
||||
// Swift
|
||||
globs = append(globs, "Package.swift")
|
||||
// Pub
|
||||
globs = append(globs, "pubspec.yaml")
|
||||
globs = append(globs, "pubspec.lock")
|
||||
// Carthage
|
||||
globs = append(globs, "Cartfile")
|
||||
globs = append(globs, "Cartfile.private")
|
||||
globs = append(globs, "Cartfile.resolved")
|
||||
// Dub
|
||||
globs = append(globs, "dub.json")
|
||||
globs = append(globs, "dub.sdl")
|
||||
// Julia
|
||||
globs = append(globs, "REQUIRE")
|
||||
// Shards
|
||||
globs = append(globs, "shard.yml")
|
||||
globs = append(globs, "shard.lock")
|
||||
// Go
|
||||
globs = append(globs, "glide.yaml")
|
||||
globs = append(globs, "glide.lock")
|
||||
globs = append(globs, "Godeps")
|
||||
globs = append(globs, "Godeps/Godeps.json")
|
||||
globs = append(globs, "vendor/manifest")
|
||||
globs = append(globs, "vendor/vendor.json")
|
||||
globs = append(globs, "Gopkg.toml")
|
||||
globs = append(globs, "Gopkg.lock")
|
||||
// Elm
|
||||
globs = append(globs, "elm-package.json")
|
||||
globs = append(globs, "elm_dependencies.json")
|
||||
globs = append(globs, "elm-stuff/exact-dependencies.json")
|
||||
// Haxelib
|
||||
globs = append(globs, "haxelib.json")
|
||||
// Hackage
|
||||
globs = append(globs, "*.cabal")
|
||||
globs = append(globs, "cabal.config")
|
||||
|
||||
return globs
|
||||
}
|
99
manifests.go
Normal file
99
manifests.go
Normal file
@ -0,0 +1,99 @@
|
||||
// package main
|
||||
|
||||
// func getManifests() []string {
|
||||
// globs := make([]string, 66) // Increment when adding new manifest types
|
||||
|
||||
// // Hackage
|
||||
// globs = append(globs, "*.cabal")
|
||||
// // npm
|
||||
// globs = append(globs, "package.json")
|
||||
// globs = append(globs, "package-lock.json")
|
||||
// globs = append(globs, "npm-shrinkwrap.json")
|
||||
// globs = append(globs, "yarn.lock")
|
||||
// // Maven
|
||||
// globs = append(globs, "pom.xml")
|
||||
// globs = append(globs, "ivy.xml")
|
||||
// globs = append(globs, "build.gradle")
|
||||
// // RubyGems
|
||||
// globs = append(globs, "Gemfile")
|
||||
// globs = append(globs, "Gemfile.lock")
|
||||
// globs = append(globs, "gems.rb")
|
||||
// globs = append(globs, "gems.locked")
|
||||
// globs = append(globs, "*.gemspec")
|
||||
// // Packagist
|
||||
// globs = append(globs, "composer.json")
|
||||
// globs = append(globs, "composer.lock")
|
||||
// // PyPi
|
||||
// globs = append(globs, "setup.py")
|
||||
// globs = append(globs, "req*.txt")
|
||||
// globs = append(globs, "req*.pip")
|
||||
// globs = append(globs, "requirements/*.txt")
|
||||
// globs = append(globs, "requirements/*.pip")
|
||||
// globs = append(globs, "Pipfile")
|
||||
// globs = append(globs, "Pipfile.lock")
|
||||
// // Nuget
|
||||
// globs = append(globs, "packages.config")
|
||||
// globs = append(globs, "Project.json")
|
||||
// globs = append(globs, "Project.lock.json")
|
||||
// globs = append(globs, "*.nuspec")
|
||||
// globs = append(globs, "paket.lock")
|
||||
// globs = append(globs, "*.csproj")
|
||||
// // Bower
|
||||
// globs = append(globs, "bower.json")
|
||||
// // CPAN
|
||||
// globs = append(globs, "META.json")
|
||||
// globs = append(globs, "META.yml")
|
||||
// // CocoaPods
|
||||
// globs = append(globs, "Podfile")
|
||||
// globs = append(globs, "Podfile.lock")
|
||||
// globs = append(globs, "*.podspec")
|
||||
// // Clojars
|
||||
// globs = append(globs, "project.clj")
|
||||
// // Meteor
|
||||
// globs = append(globs, "versions.json")
|
||||
// // CRAN
|
||||
// globs = append(globs, "DESCRIPTION")
|
||||
// // Cargo
|
||||
// globs = append(globs, "Cargo.toml")
|
||||
// globs = append(globs, "Cargo.lock")
|
||||
// // Hex
|
||||
// globs = append(globs, "mix.exs")
|
||||
// globs = append(globs, "mix.lock")
|
||||
// // Swift
|
||||
// globs = append(globs, "Package.swift")
|
||||
// // Pub
|
||||
// globs = append(globs, "pubspec.yaml")
|
||||
// globs = append(globs, "pubspec.lock")
|
||||
// // Carthage
|
||||
// globs = append(globs, "Cartfile")
|
||||
// globs = append(globs, "Cartfile.private")
|
||||
// globs = append(globs, "Cartfile.resolved")
|
||||
// // Dub
|
||||
// globs = append(globs, "dub.json")
|
||||
// globs = append(globs, "dub.sdl")
|
||||
// // Julia
|
||||
// globs = append(globs, "REQUIRE")
|
||||
// // Shards
|
||||
// globs = append(globs, "shard.yml")
|
||||
// globs = append(globs, "shard.lock")
|
||||
// // Go
|
||||
// globs = append(globs, "glide.yaml")
|
||||
// globs = append(globs, "glide.lock")
|
||||
// globs = append(globs, "Godeps")
|
||||
// globs = append(globs, "Godeps/Godeps.json")
|
||||
// globs = append(globs, "vendor/manifest")
|
||||
// globs = append(globs, "vendor/vendor.json")
|
||||
// globs = append(globs, "Gopkg.toml")
|
||||
// globs = append(globs, "Gopkg.lock")
|
||||
// // Elm
|
||||
// globs = append(globs, "elm-package.json")
|
||||
// globs = append(globs, "elm_dependencies.json")
|
||||
// globs = append(globs, "elm-stuff/exact-dependencies.json")
|
||||
// // Haxelib
|
||||
// globs = append(globs, "haxelib.json")
|
||||
// // Hackage
|
||||
// globs = append(globs, "*.cabal")
|
||||
// globs = append(globs, "cabal.config")
|
||||
|
||||
// return globs
|
||||
// }
|
Loading…
Reference in New Issue
Block a user