appcelerator-archive / windowslib

This is a library of utilities for dealing programmatically with Windows Phone applications, used namely for tools like Titanium.
http://www.appcelerator.com
Other
4 stars 10 forks source link

Remove yarn, add jenkinsfile to npmignore #77

Closed ewanharris closed 7 years ago

sgtcoolguy commented 7 years ago

I'm trying to get more standardized on builds, and moving back to npm 5 is good.

You can also re-use some build steps defined in the pipeline library to replace some chunks of the Jenkinsfile now.

For example the JIRA section can use this now (just keep the if guard so it doesn't happen on non-master branches):

updateJIRA('TIMOB', "windowslib ${packageVersion}", scm)

Also, I'm moving to trigger publish/tagging/JIRA updates to if the branch is explicitly 'master', rather than when it's not a PR.

So I'm changing:

def isPR = false
// ...
isPR = env.BRANCH_NAME.startsWith('PR-')
// ...
if (!isPR) {
  bat 'npm publish'
}

to:

def isMaster = false
// ...
isMaster = env.BRANCH_NAME.equals('master')
// ...
if (isMaster) {
  bat 'npm publish'
}
ewanharris commented 7 years ago

@sgtcoolguy Thanks, I'll update with your suggestions tomorrow, . If we're going to be using npm5 I might try and replace the npm i --global calls with npx too

ewanharris commented 7 years ago

@sgtcoolguy Updated to use your suggestions, didn't go with npx as the version in npm@5.2.0 seems broken on Windows, 5.3.0 works but kept with 5.2.0 to avoid causing any other repos problems.