1. #!/usr/bin/env node
    
  2. 
    
  3. 'use strict';
    
  4. 
    
  5. const clear = require('clear');
    
  6. const {join, relative} = require('path');
    
  7. const theme = require('../theme');
    
  8. 
    
  9. module.exports = ({cwd}, isStableRelease) => {
    
  10.   const publishPath = relative(
    
  11.     process.env.PWD,
    
  12.     join(__dirname, '../publish.js')
    
  13.   );
    
  14. 
    
  15.   clear();
    
  16. 
    
  17.   let message;
    
  18.   if (isStableRelease) {
    
  19.     message = theme`
    
  20.       {caution A stable release candidate has been prepared!}
    
  21. 
    
  22.       You can review the contents of this release in {path build/node_modules/}
    
  23. 
    
  24.       {header Before publishing, consider testing this release locally with create-react-app!}
    
  25. 
    
  26.       You can publish this release by running:
    
  27.       {path   ${publishPath}}
    
  28.     `;
    
  29.   } else {
    
  30.     message = theme`
    
  31.       {caution A "next" release candidate has been prepared!}
    
  32. 
    
  33.       You can review the contents of this release in {path build/node_modules/}
    
  34. 
    
  35.       You can publish this release by running:
    
  36.       {path   ${publishPath}}
    
  37.     `;
    
  38.   }
    
  39. 
    
  40.   console.log(message.replace(/\n +/g, '\n').trim());
    
  41. };