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

Preserve permissions in the artifact #138

Merged
merged 2 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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