Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0637d64475 | ||
|
|
749f39fdc2 | ||
|
|
b92360d4e2 |
No files matched your search
@@ -1,5 +1,11 @@
|
|||||||
## ChangeLog
|
## ChangeLog
|
||||||
|
|
||||||
|
### v1.19.1
|
||||||
|
|
||||||
|
#### Fixes
|
||||||
|
|
||||||
|
- #123 - Install builder: remove target file before copying to avoid errors due to overwriting read-only files
|
||||||
|
|
||||||
### v1.19.0
|
### v1.19.0
|
||||||
|
|
||||||
#### New Features
|
#### New Features
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
rscons (1.19.0)
|
rscons (1.19.1)
|
||||||
json (>= 1.8, < 3.0)
|
json (>= 1.8, < 3.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Rscons::Environment.new do |env|
|
||||||
|
env.Install("dest", "install.rb")
|
||||||
|
end
|
||||||
@@ -47,6 +47,7 @@ module Rscons
|
|||||||
printed_message = true
|
printed_message = true
|
||||||
end
|
end
|
||||||
cache.mkdir_p(File.dirname(dest))
|
cache.mkdir_p(File.dirname(dest))
|
||||||
|
FileUtils.rm_f(dest)
|
||||||
FileUtils.cp(src, dest, :preserve => true)
|
FileUtils.cp(src, dest, :preserve => true)
|
||||||
end
|
end
|
||||||
cache.register_build(dest, :Copy, [src], env)
|
cache.register_build(dest, :Copy, [src], env)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module Rscons
|
module Rscons
|
||||||
# gem version
|
# gem version
|
||||||
VERSION = "1.19.0"
|
VERSION = "1.19.1"
|
||||||
end
|
end
|
||||||
@@ -1002,6 +1002,22 @@ EOF
|
|||||||
expect(lines(result.stdout)).to eq ["Install inst.exe"]
|
expect(lines(result.stdout)).to eq ["Install inst.exe"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "overwrites a read-only file" do
|
||||||
|
test_dir("build_dir")
|
||||||
|
|
||||||
|
FileUtils.chmod("a=r", "install.rb")
|
||||||
|
result = run_test(rsconsfile: "install_read_only.rb")
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(lines(result.stdout)).to eq ["Install dest"]
|
||||||
|
|
||||||
|
FileUtils.rm_f("install.rb")
|
||||||
|
File.binwrite("install.rb", "hi")
|
||||||
|
FileUtils.chmod("a=r", "install.rb")
|
||||||
|
result = run_test(rsconsfile: "install_read_only.rb")
|
||||||
|
expect(result.stderr).to eq ""
|
||||||
|
expect(lines(result.stdout)).to eq ["Install dest"]
|
||||||
|
end
|
||||||
|
|
||||||
it "operates the same as a Copy builder" do
|
it "operates the same as a Copy builder" do
|
||||||
test_dir("build_dir")
|
test_dir("build_dir")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user