uDeploy does not include all sub-folders (wildcard not working) - deployment

On my uDeploy process, I created .zip file step.
After downloading artifacts, I want uDeploy to zip all files under base directory.
Base directory structure:
archive
sites
bin
*All binaries required*
Include option is set for **/* and I assume this wildcard should include all subdirectories to archive (.zip)
But after I run the process, I am getting following warning:
Working Directory: E:\CustomerFtp\Rel_1.0_20160418_122247\Artifacts
Base Directory: E:\CustomerFtp\Rel_1.0_20160418_122247\Artifacts\Archive
Zip file name: CustomerFtp.Archive.zip
Include: **/*
Exclude:
Update : false
Follow Symlinks: false
Case Sensitive: false
=================================
[zip] Warning: skipping zip archive E:\CustomerFtp\Rel_1.0_20160418_122247\Artifacts\CustomerFtp.Archive.zip because no files were included.
Am I missing something?

It is a sort of stupid, but even on Windows, looks like folder paths are case-sensitive for uDeploy.
So, I had to change folder name from archive to Archive, and problem get fixed.

Related

Unity Gitignore not ignoring binary files

I have a problem with the .gitignore file in my Multiplayer Unity game project (consists of a game server and a client project in a single repository). The .gitignore file ignores most of the files, but not the binary files from the library artifacts.
Image of binary files showing in Github Desktop.
I know the .gitignore file works because if I remove it there is 30000 changed files and 8000 without removing it.
# This .gitignore file should be placed at the root of your Unity project directory
#
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
#
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
[Uu]ser[Ss]ettings/
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/
# Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta
# Uncomment this line if you wish to ignore the asset store tools plugin
# /[Aa]ssets/AssetStoreTools*
# Autogenerated Jetbrains Rider plugin
/[Aa]ssets/Plugins/Editor/JetBrains*
# Visual Studio cache directory
.vs/
# Gradle cache directory
.gradle/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
*.mdb.meta
# Unity3D generated file on crash reports
sysinfo.txt
# Builds
*.apk
*.aab
*.unitypackage
# Crashlytics generated file
crashlytics-build.properties
# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
Image of the repository folder with the 2 projects
hehe i think your answer is on the first line of the .gitignore
This .gitignore file should be placed at the root of your Unity project directory
All of those ignore paths without a preceeding / are only relative to the location of the .gitignore. It works like so:
Will ignore:
./Build/myBinary
Will not ignore:
./project1/Build/myBinary
./project2/Build/myBinary
Simplest solution is to duplicate your .gitignore and place one of each at the root of each project directory, not the repo directory.
Your directory should look like this:
myRepo
project1
.gitignore
Assets
...
project2
.gitignore
Assets
...
As mentioned, if files in these directories have already been committed they will need to be removed manually.
To be sure, assuming there are only binaries in this folders, try and delete them (from the Git index only, not from your disk), and check immediately (no commit needed) if your .gitignore applies.
cd /path/to/repo
git rm -r --cached path/to/folder/with/binaries/ # note the trailing slash
git check-ignore -v path/to/folder/with/binaries/aBinary # must be a file
If the last command does not return anything, then no .gitignore rule applies.

NuGet (non-)deployment of dll.config file in lib folder of System.Data.SQLite.Core Package?

Question
What is the meaning of the package author of System.Data.SQLite packaging a .dll.config file in such a way that it is included in the output directory by the default(?) NuGet mechanism, when the same puts a comment into the file that you should not copy the file to the output directory??
Is it possible to prevent NuGet/MSBuild/VisualStudio to copy said file to the output directory?
That is, is it possible to prevent a "related" file from nupkg\lib\net46 being copied to the output directory?
Details
The System.Data.SQLite.Core NuGet package contains the System.Data.SQLite.dll file (among other things), as well as the additional files System.Data.SQLite.xmland System.Data.SQLite.dll.config.
These three files are located in all \lib\<framework>\ folders of the nupkg.
Accordingly, Visual Studio / MSBuild / NuGet copies these files to the output folder:
8> Primary reference "System.Data.SQLite, Version=1.0.111.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139". (TaskId:102)
8> Resolved file path is "c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll". (TaskId:102)
8> Reference found at search path location "{HintPathFromItem}". (TaskId:102)
8> Found related file "c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.xml". (TaskId:102)
8> Found related file "c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll.config". (TaskId:102)
...
8> c:\kse\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll.config
8> CopyLocal=true
8> FusionName=
8> HintPath=c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll
8> OriginalItemSpec=c:\...\nuget\System.Data.SQLite.Core.1.0.111.0\lib\net46\System.Data.SQLite.dll
8> ResolvedFrom={HintPathFromItem}
8> Version=1.0.111.0
However this file contains a disclaimer:
* System.Data.SQLite.dll.config -
*
* WARNING: This XML configuration file is intended for use within the NuGet
* package directories only. Please do not copy this file to any of
* the build output directories because it could interfere with the
* native library pre-loading feature.
-- that it should not be copied. So: how do I not copy it? Should I care?
Note that System.Data.SQLite.dll.config seems to be better documented under a different path.
If you reference NuGet packages with PackageReference, you can exclude assets from being imported into your project with the ExcludeAssets attribute as described here in section "Controlling Dependency Assets". However, this excludes a group of assets and does not allow for controlling single files and will not solve this problem.
Apart from that you could employ custom MS Build logic or try to delete the .config files with a post build event, which would both be similiar in the result.

How do you re-ignore files using .artifactignore with PublishPipelineArtifacts#2

I have a .artifactignore at the root of my repository that looks like:
**/*
!**/bin/**/*
!**/obj/**/*
I can observe the .artifactignore being evaluated in the logs such as this:
Uploading pipeline artifact from d:\a\1\s for build #10471
Information, ApplicationInsightsTelemetrySender will correlate events with X-TFS-Session GUID
Information, DedupManifestArtifactClient will correlate http requests with X-TFS-Session GUID
Information, Using .artifactignore file located at: d:\a\1\s\.artifactignore for globbing
Information, Processing .artifactignore file surfaced 20721 files. Total files under source directory: 21471
This correctly excludes everything but bin and obj directories. I would like to extend this .artifactignore such that it has the additional behavior:
Ignores all pdb files regardless of their location
I have tried several variations:
**/*
!**/bin/**/*
!**/obj/**/*
*.pdb
**/*
!**/bin/**/*
!**/obj/**/*
.pdb
**/*
!**/bin/**/*
!**/obj/**/*
**/*.pdb
**/*
!**/bin/**/*
!**/obj/**/*
!!*.pdb
**/*
!**/bin/**/*
!**/obj/**/*
!!**/*.pdb
**/*
!**/bin/
!**/obj/
!!**/*.pdb
With several other variations I'm sure. All of these contain all of the .pdb files that are present in the bin folders.
How do I publish all the bin and obj folders without bringing along the .pdb files?
How do I publish all the bin and obj folders without bringing along the .pdb files?
I am afraid there is no such out of box syntax you could re-include a file if a parent directory of that file is excluded.
That means, you use the syntax !**/bin/**/* to exclude the parent folder bin from the .artifactignore file, you could not re-use the syntax *.pdb or any other to re-include the file .pdb.
As the document state:
Refer to the Git guidance on the .gitignore syntax, the syntax for
.artifactignore is the same.
To check the details info, you could refer this thread about .gitignore syntax.
As workaround for this issue, we could use following syntax to including all the file types except the .pdb file:
**/*
!**/bin/**/*.dll
!**/bin/**/*.xml
!**/bin/**/*.config
!**/obj/**/*.dll
!**/obj/**/*.xml
!**/obj/**/*.config
Hope this helps.

Custom deployment with sbt

I have a Scala application and i want to setup a deployment process result similar to one Akka sbt plugin gives, but i it requires project to be a microkernel. Sbt-assembly is a very cool plugin, but i want to have a free access to my config files, basically i want to have the following app structure:
/app/bin - start script bash file
/config - all my application .conf files
/deploy - my project .jar with classes
/lib - all my dependencies .jar files
/logs - log files
I we checked typesafe sbt-native-packager, it's better, but it could place my .conf file and logs out of jars. All those settings in SBT looks confusing to me, what can i do to with this?
Actually this is not hard to update akka-sbt-plugin to make it work in general, add this file to your project folder and somewhere in your build the following settings:
.settings(Distribution.distSettings: _*)
.settings(mappings in Compile in packageBin ~= { _.filter(!_._1.getName.endsWith(".conf")) })
The first line adds all dist settings to your project and the second one excludes all .conf files from your .jar and reads them from config folder.
Now you have to commands: dist - creates a folder with a structure you've discribed and zipDist which packs it all into .zip file, later you can add this to you publish setting:
addArtifact(Artifact(someName, "zip", "zip"), zipDist)

Copy sources files into target directory with SBT

I recently decided to use SBT to build an existing project.
In this project I have some .glsl files within the scala packages which I need to copy during the compilation phase.
The project is structured like this :
- myapp.opengl
- Shader.scala
- myapp.opengl.shaders
- vertex_shader.glsl
- fragment_shader.glsl
Is this file structure correct for SBT or do I need to put the .glsl files into an other directory. And do you know a clean way to copy these files into the target folder ?
I would prefer not putting these files into the resources directory since they are (non-compiled) sources files
Thanks
I would not recommend putting those files into src/main/scala as they do not belong there. If you want to keep them separate from your resource files, you can put them in a custom path, e.g. src/main/glsl and add the following lines to your project definition to have them copied into output directory:
val shaderSourcePath = "src"/"main"/"glsl"
// use shaderSourcePath as root path, so directory structure is
// correctly preserved (relative to the source path)
def shaderSources = (shaderSourcePath ##) ** "*.glsl"
override def mainResources = super.mainResources +++ shaderSources