Skip to main content

Assemble Git repos into a deployable tree of code.

Project description

Provides a way to assemble various Git repositories into one. It’s like submodules that don’t suck.

Use case: stitch together Wordpress with some themes and plugins before deploying.

Usage

First, you need to create your Castor repository. The following command will create an new Git repository containing an empty Castorfile and a pre-initialized .gitignore.

castor init my-proj

Then, you need to edit your Castorfile. It might look like

Note

post_freeze array is optional. It must be an array, each command will be executed on the target directory after executing castor freeze.

{
    "lodge": [
        {
            "target": "/",
            "version": "1.6.1.0",
            "repo": "https://github.com/PrestaShop/PrestaShop.git",
            "type": "git"
        },
        {
            "target": "/themes/my-prestashop-theme",
            "version": "e0e7c15789e6ff674cd75cb24981155441c3df09",
            "repo": "git@bitbucket.org:activkonnect/my-prestashop-theme.git",
            "type": "git",
            "post_freeze": [
                "composer update --no-dev"
            ]
        },
        {
            "target": "/.htaccess",
            "type": "file",
            "source": "files/htaccess"
        }
    ]
}

Your Castorfile being filled up, you can now apply it

castor apply

This will automatically create your repositories hierarchy, checkout submodules, etc. The root of this hierarchy will be the lodge directory.

Now you can freeze your project into a git-free, commitable and deployable tree of source code. This will go into the dam directory.

castor freeze

You can use the lodge as your working directory during development. If you make updates to the code, you can commit in the git repos. If you simply want to update upstream code, check out the new tag/commit you want to use. Then you can use castor freeze again, and it will update the Castorfile automatically with the latest Git HEADs, as well as the dam directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

castor-0.2.1.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file castor-0.2.1.tar.gz.

File metadata

  • Download URL: castor-0.2.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for castor-0.2.1.tar.gz
Algorithm Hash digest
SHA256 50effe2e4f949739d8d36a1c62c79bce9b73d0e9e9015ddb8c4bcf5fc8daf829
MD5 6a120738370aa4ffade5d5833fa1bc7d
BLAKE2b-256 bf92792068e92799bea77259e9a6d46346896db59f2e5d1b3a8c700b6c51cbd7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page