synopsis

package module
v0.0.0-...-58f5477 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

README

Synopsis CircleCI codecov Go Report Card

Composer Package Repository Generator

Synopsis - it is a tool for generate private composer package repository. It is work like satis. But more faster, because build time not depend from quantity of repository.

Need install golang:

go get github.com/johnnywidth/synopsis

Example config.json file:

File look like satis.

{
  "name": "Private Package Repository",
  "homepage": "http://localhost:9091",
  "archive": {
    "format": "zip",
    "directory": "dist",
    "skip-dev": false
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "[email protected]:johnnywidth/synopsis.git"
    }
  ]
}

Supported satis config params:

  • archive
    • directory
    • skip-dev
    • format # only zip
    • prefix-url
  • repositories
    • type # only vcs, git, composer (but this mean the same)
    • url

Not supported satis config params:

License

Licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Documentation

Index

Constants

View Source
const FileChunk = 8192

FileChunk is chunk

Variables

This section is empty.

Functions

func Compress

func Compress(u string, config Config, d driver.Driver, p *composer.JSONData) error

Compress make archive from repository branch

func HandleCompress

func HandleCompress(u string, config Config, d driver.Driver, ch chan composer.JSONData)

HandleCompress handle compress

Types

type Archive

type Archive struct {
	Directory string `json:"directory"`
	Format    string `json:"format"`
	SkipDev   bool   `json:"skip-dev"`
	PrefixURL string `json:"prefix-url"`
}

Archive is archive field in config file

type Config

type Config struct {
	File         File
	FileName     string
	ThreadNumber int
	OutputDir    string
	DistDir      string
}

Config is app config

func (*Config) MakeOutputDir

func (config *Config) MakeOutputDir()

MakeOutputDir create dir for archive repository branch and packages.json file

func (*Config) PrepareConfig

func (config *Config) PrepareConfig(cf string, od string, tn string) error

PrepareConfig read config file and create config structure

type File

type File struct {
	Name         string       `json:"name"`
	Homepage     string       `json:"homepage"`
	Archive      Archive      `json:"archive"`
	Repositories []Repository `json:"repositories"`
}

File is config file

type Repository

type Repository struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

Repository is repository field in config file

func (*Repository) UpdateAll

func (repo *Repository) UpdateAll(config Config) (composer.PackageJSON, error)

UpdateAll update all repositories

Directories

Path Synopsis
repository

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL