Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
824 B

  1. // https://docs.microsoft.com/en-us/vsts/pipelines/build/variables
  2. // The docs indicate that SYSTEM_PULLREQUEST_SOURCEBRANCH and SYSTEM_PULLREQUEST_TARGETBRANCH are in the long format (e.g `refs/heads/master`) however tests show they are both in the short format (e.g. `master`)
  3. module.exports = {
  4. detect({env}) {
  5. return Boolean(env.BUILD_BUILDURI);
  6. },
  7. configuration({env}) {
  8. const pr = env.SYSTEM_PULLREQUEST_PULLREQUESTID;
  9. const isPr = Boolean(pr);
  10. return {
  11. name: 'Visual Studio Team Services',
  12. service: 'vsts',
  13. commit: env.BUILD_SOURCEVERSION,
  14. build: env.BUILD_BUILDNUMBER,
  15. branch: isPr ? env.SYSTEM_PULLREQUEST_TARGETBRANCH : env.BUILD_SOURCEBRANCHNAME,
  16. pr,
  17. isPr,
  18. prBranch: isPr ? env.SYSTEM_PULLREQUEST_SOURCEBRANCH : undefined,
  19. root: env.BUILD_REPOSITORY_LOCALPATH,
  20. };
  21. },
  22. };