I'm running `suitecloud project:deploy --dryrun` a...
# sdf
d
I'm running
suitecloud project:deploy --dryrun
and it reported it was going to upload a file I wasn't expecting... so I imported it, and ran
suitecloud project:deploy --dryrun
again. And again it reports it's going to upload that file again. How does
suitecloud project:deploy
determine which files will be uploaded? Does it compute/compare a hash? Slack Conversation
a
It checking your deploy.xml whatever is defined there in
file
it will check if it exists in File cabinet or not. If it's existing it will simply update, if its not in file cabinet then it will upload.
d
thanks @Ali Syed (NS DevTools QA), in my case I have:
Copy code
<deploy>
  <files>
    <path>~/FileCabinet/SuiteScripts/MyCompany/*</path>
which includes hundreds of scripts. running
suitecloud project:deploy --dryrun
reports ~20 scripts to be uploaded. I assumed those were scripts that had changes?
git diff
is reporting some of the scripts are the same between NetSuite FileCabinet and local.
a
If dryrun is detecting a change then it will log them as
update
and if they are new then they will be logged as
upload
d
I've never seen
update
as an option before, I've only ever seen
upload
. Just updated to
"@oracle/suitecloud-cli": "^1.3.1"
so I let
suitecloud project:deploy
deploy those changes, (even though they were the same), and when I ran
suitecloud project:deploy --dryrun
again, it did not report any differences. (So I'm not sure how SDF determines if a file is different. Using UTF8 with CRLF endings, not sure what else to check.) To test if it would
update
, I changed the file locally, ran
suitecloud project:deploy --dryrun
and again it reported it as an
upload
s
I don't recall every seeing
update
listed by the cli either.
and it does seem to sometimes detect (or not detect) changes that it should(nt)
a
Oh sorry. I mixed the file with object. You are right. Update is for objects if it detects a change. For files it's always upload.
d
thanks for the clarification. Trying setup my dev team on a ci/cd integration, want to make sure the suitecloud is viable/reliable
a
So either its line endings, happening locally.
s
I would be curious as well to know how the CLI determines if a file has changed
(e.g. a script file)
a
It's not the CLI detecting the change. Cli zips the project according to the deploy xml and send it to the server side. There the comparison happens between incoming project and already deployed project
blobthinkingeyes 1
s
I would prefer if SDF always agreed with my version control system in regards to what files have changed and which haven't.
(assuming the latest has been previously deployed)
d
do we know how those server side differences are compared? that might shed some light so we know what to expect
1