jamesmontemagno / vsts-mobile-tasks

VSTS Tasks for Mobile!
MIT License
79 stars 22 forks source link

Upgrade Scripts to TypeScript #4

Closed SkyeHoefling closed 6 years ago

SkyeHoefling commented 6 years ago

As it stands today PowerShell does not work on macOS Build Agents for VSTS Tasks it is only supported on Windows Build Agents. While I believe these scripts should remain in powershell, the only way we are going to get this into the marketplace soon is by converting the scripts over to typescript.

If we do this it will fix

3

I'm going to start working on a fork to convert the scripts

jamesmontemagno commented 6 years ago

Sounds good, let's also leave the powershell scripts in there too for legacy. I will also download the old bash scripts and put them in there too so people can reference them.

SkyeHoefling commented 6 years ago

I agree all the scripts will be useful to have in the code base.

SkyeHoefling commented 6 years ago

I just deployed a local build of iOS Bump Version to my mac VSTS Agent and the script appears to be working. Now that I have a handle on how typescript works it should be relatively easy to update the remaining scripts

image

SkyeHoefling commented 6 years ago

I am finishing up on the iOSBumpVersion number and to print out the Info.plist to the screen I took the dependency on this npm library: https://www.npmjs.com/package/tsd

I was not able to install it into the tasks node_modules for the particular task, there was an issue when I attempted to publish. I ended up installing it globally and I am not sure how to make this work on build agents where it would need to install. This may be something we need to figure out later but right now I think we are going to have the build agent require this command

jamesmontemagno commented 6 years ago

I think i did android... @ahoefling maybe you can take a look

SkyeHoefling commented 6 years ago

@jamesmontemagno your guess is as good as mine for using those libraries, but you have my seal of approval if that means anything :)

It was a real pain getting this deployed to the marketplace. I can get on a call with you and help you out with it if you want. Basically what I did is:

  1. Transpiled the typescript into js
  2. Verify the manifest file references the transpiled js file and not the typescript file.
  3. Deploy the compiled code to the marketplace
  4. .....
  5. Test it out in your VSTS instance and hope it works
jamesmontemagno commented 6 years ago

I now have them all running and working!

The XML parsing is a bit weird, but works.

It does strip off: <?xml version="1.0" encoding="utf-8"?>, but I add them back on manually.

Tested in my vsts in both iOS/Android!!