Question

I am using Azure Mobile Services as the backend for my mobile app. Despite my best efforts, my server side scripts are getting complex now. Is there a way I can keep the insert, update, read, delete scripts for the tables in my service, in source control and maybe have a way to deploy them from within Visual Studio?

Était-ce utile?

La solution 2

Since this question has been answered, a new feature has been added to Azure Mobile Services - integration with Git source control. Basically you can enable this feature in the dashboard of your mobile service, and it converts the storage in a Git repository which you can clone / pull and push updates to.

You can find more information in the tutorial at http://www.windowsazure.com/en-us/develop/mobile/tutorials/store-scripts-in-source-control/.

Autres conseils

Have you checked out the node Azure Command Line Tools? This will likely hold the solution to your problems. These tools allow you to neatly manage your mobile service from your dev machine. The newly added cli tools for Mobile Services also support downloading your scripts. Just run the following command in your Azure Powershell:

azure mobile script download <service_name> <script_name>

The script name syntax is as follows:

  1. For tables: table/.{insert|read|update|delete}
  2. Apple Push Notification: shared/apnsFeedback
  3. Scheduler: scheduler/

Once you have your scripts downloaded and placed on your local filesystem, you could put them in source control with your client that consumes your mobile service, or just throw them in their own git repository. You can't, however, sync your source control repository with your mobile service. In order to upload any changes you've made to your scripts, you'd need to execute the following command in the Azure-CLI again:

azure mobile script upload <service_name> <script_name>

I'm not sure if you can upload multiple scripts at once though. You could probably use some of the Azure-CLI Automation scripts I saw Glenn Block post on github. This could allow you to somehow automate uploading the scripts as a part of your build workflow.

Edit:

I found a few more resources that might help you with this:

These are some great resources from Josh Twist. I'm sure they will push you in the right direction.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top