Skip to content

Commit

Permalink
Merge pull request #138 from palantirnet/preserve-mode-for-acquia-hooks
Browse files Browse the repository at this point in the history
Preserve permissions in the artifact
  • Loading branch information
becw authored Dec 2, 2019
2 parents 27a8d83 + 1329acb commit 8308067
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## Unreleased

### Changed

* Preserve file permissions when building the artifact (#130 / #138)

## Release 2.1.1

### Added
Expand Down
5 changes: 4 additions & 1 deletion targets/artifact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@


<target name="artifact-updateCode">
<!-- Sometimes files have read-only permissions that will cause issues when we
attempt to remove them. -->
<exec dir="${artifact.directory}" command="chmod -R 750 ." checkreturn="true" logoutput="true" />
<!-- Remove all the existing files so that we can install cleanly. -->
<delete includeemptydirs="true">
<fileset dir="${artifact.directory}" defaultexcludes="false" excludes=".git,.git/**" includes="**/*,**/.git,**/.git/**" />
Expand All @@ -205,7 +208,7 @@
<tempfile property="tmpfile" destdir="${build.dir}/artifacts" />
<exec command="git ls-files" dir="${build.dir}" output="${tmpfile}" />

<copy todir="${artifact.directory}" preservemode="false" mode="750" overwrite="true" haltonerror="true">
<copy todir="${artifact.directory}" overwrite="true" haltonerror="true">
<filelist dir="${build.dir}" listfile="${tmpfile}" />
</copy>
<delete file="${tmpfile}" />
Expand Down

0 comments on commit 8308067

Please sign in to comment.