Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Add assets loading, binary selection and VCS information in manifest #13

Merged
merged 21 commits into from
Mar 13, 2015

Commits on Feb 26, 2015

  1. Put options into separate function

    Just a tidbit of refactoring.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    835e5f2 View commit details
    Browse the repository at this point in the history
  2. Allow specifying which binary to put into ACI

    Add --use-binary option which allows user to choose which binary
    should be placed in the image if go get builds multiple binaries.
    
    This change also introduces some changes in naming - when project
    example.com/foo/bar has binaries bar and quux, then for quux the
    created image will have a filename bar-quux.aci, name in manifest will
    be example.com/foo/bar-quux.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    19f485a View commit details
    Browse the repository at this point in the history
  3. Allow specifying assets

    Add --asset option which takes two paths separated with OS specific
    path separator (colon on Unices, semicolon on Windows). The first path
    specifies a path inside produced image, second part - the path from
    local filesystem which will be copied into image.
    
    We handle only regular files, directories and symlinks that does not
    point outside the asset.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    d6a542a View commit details
    Browse the repository at this point in the history
  4. Allow preserving temporary directory

    This is strictly developer option to be able to view the contents of
    /tmp/goaciXXX directory, when something goes wrong.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    578979c View commit details
    Browse the repository at this point in the history
  5. Add VCS specific label to manifest

    It supports getting information from git, hg, svn and bzr.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    51d508a View commit details
    Browse the repository at this point in the history
  6. Move asset code into separate file

    The goaci.go already looks like a kitchen sink with two year old
    leftovers. Let's clean it up a bit.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    9f9d591 View commit details
    Browse the repository at this point in the history
  7. Preserve absolute symlink targets

    If a symlink target is an absolute path still pointing somewhere
    inside the asset it sits in then preserve the absoluteness even in
    rootfs. That requires a bit of path munging.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    897d6c3 View commit details
    Browse the repository at this point in the history
  8. Add placeholders for assets

    Add two placeholders - GOPATH and PROJPATH. GOPATH placeholder is
    obvious. PROJPATH placeholder will be replaced with absolute path to
    project go get is building. Usage is simple:
    
    --asset /assets:<PROJPATH>/assets
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    3c49b94 View commit details
    Browse the repository at this point in the history
  9. Refactor asset handling

    Split out some code to separate functions with hopefully
    self-explanatory names. The additional aim is to have function fit
    into single screen.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    fcbabce View commit details
    Browse the repository at this point in the history
  10. Put misc functions in separate file

    Remove some more clutter from goaci.go.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    2ccaf9b View commit details
    Browse the repository at this point in the history
  11. More reliable project option parsing

    We are using flag package for option parsing, so stop using os.Args.
    We can take the project from flag.Args after ensuring that it has one
    and only one string.
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    fa54476 View commit details
    Browse the repository at this point in the history
  12. The grand refactoring of code

    This basically rewrites goaci.go into many smaller and clearer
    functions. It also removes all uses of die function, so the deferred
    removal of /tmp/goaciXXX is actually executed (die used os.Exit()
    which prevented that).
    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    4c2f499 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    28b9f0a View commit details
    Browse the repository at this point in the history
  14. Update README

    krnowak committed Feb 26, 2015
    Configuration menu
    Copy the full SHA
    9dd4763 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2015

  1. Lift restrictions for symlinks in assets

    That simplifies the code a lot for a short while. Later some of it
    will probably come back when we implement checking for dangling
    symlinks after assets are copied.
    krnowak committed Mar 13, 2015
    Configuration menu
    Copy the full SHA
    b7a5848 View commit details
    Browse the repository at this point in the history
  2. Put some strings into quotes

    These usually are filenames, so it's good to delimit them with quotes
    in case there are spaces in them.
    krnowak committed Mar 13, 2015
    Configuration menu
    Copy the full SHA
    3c5741d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1a0af7d View commit details
    Browse the repository at this point in the history
  4. Use better variable name

    krnowak committed Mar 13, 2015
    Configuration menu
    Copy the full SHA
    b378df3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f7f50b3 View commit details
    Browse the repository at this point in the history
  6. Use %q instead of "%s"

    krnowak committed Mar 13, 2015
    Configuration menu
    Copy the full SHA
    4143688 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1f5782c View commit details
    Browse the repository at this point in the history