Commit 742eeab1 authored by MARGERY David's avatar MARGERY David
Browse files

Allow for uncommited changes in Gemfile.lock

They cannot be avoided easily because bundler will change Gemfile.lock
to include version used to build bundle, and this will change between
debian versions
parent eba2e261
Pipeline #52506 waiting for manual action with stages
in 18 minutes and 22 seconds
...@@ -201,10 +201,16 @@ namespace :package do ...@@ -201,10 +201,16 @@ namespace :package do
# make sure no pending changes need to be commited to repository # make sure no pending changes need to be commited to repository
uncommitted_changes=`git status --untracked-files=no --porcelain` uncommitted_changes=`git status --untracked-files=no --porcelain`
if uncommitted_changes != "" if uncommitted_changes != ""
STDERR.puts "Unexpected diff:" # Gemfile.lock will include bundle version used. It changes between debian versions
STDERR.puts `git diff` files=uncommitted_changes.scan(/\w\s(.*)$/).flatten.reject{|f| ["Gemfile.lock"].include?(f)}
fail "You are building from a directory with uncommited files in git. Please commit pending changes so there is a chance the build can be traked back to a specific state in the repository\n#{uncommitted_changes}" if files.size > 0
STDERR.puts "Unexpected diff in #{files}:"
STDERR.puts `git diff`
fail "You are building from a directory with uncommited files in git. Please commit pending changes so there is a chance the build can be traked back to a specific state in the repository\n#{uncommitted_changes}"
else
STDERR.puts "Expected diff:"
STDERR.puts `git diff`
end
end end
# prepare the build directory # prepare the build directory
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment