Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store git commit in the lockfile #2

Merged
merged 7 commits into from
Nov 1, 2017
Merged

store git commit in the lockfile #2

merged 7 commits into from
Nov 1, 2017

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Oct 31, 2017

closes #1

we need to lock the git reference when getting source code from git

this overrides installed luarocks git strategy with custom version, it is pretty evil but works
also it stores custom property in the rockspec so it can verify it after dependencies were installed

for the record, the new format with old rover will crash like: https://circleci.com/gh/3scale/apicast/1495
Failed to parse constraint '2.0.rc12-1|' with error: Encountered bad constraint operator: 'nil' in '|'

local command = {fs.Q(git_cmd), "clone", depth or "--depth=1", rockspec.source.url, module}
local tag_or_branch = rockspec.source.tag or rockspec.source.branch
-- If the tag or branch is explicitly set to "master" in the rockspec, then
-- we can avoid passing it to Git since it's the default.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really sure of that
Can’t we choose a default branch in GH and when we clone it will be this branch that will be default?

https://stackoverflow.com/questions/18726037/what-determines-default-branch-after-git-clone

Still depends on the version of git >1.8.5
Maybe safer/simpler to add the branch?
Also if you know what you are cloning you can use —depth=1 So you are not pulling the whole history of the branch

Or maybe using this https://stackoverflow.com/a/3489576

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code is copied from luarocks itself with no changes. Honestly I don't really care much what it does because rover in later commits overrides it to just clone whole repo and do a reset.

@mikz mikz merged commit a87f21f into master Nov 1, 2017
@mikz mikz deleted the git-commit branch November 1, 2017 14:52
mikz added a commit to 3scale/APIcast that referenced this pull request Nov 2, 2017
mikz added a commit to 3scale/APIcast that referenced this pull request Nov 2, 2017
* we need to use some templating to customize nginx directives not
  accessible from Lua code (like buffer sizes, etc.)

* using liquid templating language

* introduce `bin/cli` that is a main entrypoint to:
    - configure paths to load local code and dependencies
    - execute lua cli code

* `bin/apicast` is now slim perl wrapper to setup paths,
  because it has access to current working folder and
  ritch stdlib for working with filesystem and env variables

* introduce concept of an environment,
  so each can have own config, like rails

* use latest rover and lock scm dependencies
  3scale/lua-rover#2
mikz added a commit to 3scale/APIcast that referenced this pull request Nov 2, 2017
* we need to use some templating to customize nginx directives not
  accessible from Lua code (like buffer sizes, etc.)

* using liquid templating language

* introduce `bin/cli` that is a main entrypoint to:
    - configure paths to load local code and dependencies
    - execute lua cli code

* `bin/apicast` is now slim perl wrapper to setup paths,
  because it has access to current working folder and
  ritch stdlib for working with filesystem and env variables

* introduce concept of an environment,
  so each can have own config, like rails

* use latest rover and lock scm dependencies
  3scale/lua-rover#2

update changelog
mikz added a commit to 3scale/APIcast that referenced this pull request Nov 6, 2017
* we need to use some templating to customize nginx directives not
  accessible from Lua code (like buffer sizes, etc.)

* using liquid templating language

* introduce `bin/cli` that is a main entrypoint to:
    - configure paths to load local code and dependencies
    - execute lua cli code

* `bin/apicast` is now slim perl wrapper to setup paths,
  because it has access to current working folder and
  ritch stdlib for working with filesystem and env variables

* introduce concept of an environment,
  so each can have own config, like rails

* use latest rover and lock scm dependencies
  3scale/lua-rover#2

update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ability to lock SCM dependencies
2 participants