File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -66,9 +66,12 @@ sed -i .bak -e "/currentVersion/i \\
66
66
rm guides/versions.yml.bak
67
67
echo " DONE"
68
68
69
+ echo " What version of EmberData is being released (e.g. 5.3.0)? Double check this as it might not be the same version as Ember."
70
+ read -r EMBER_DATA_CURRENT_VERSION
71
+
69
72
# Update version numbers in links
70
73
echo " 🤖 Updating version number for links in /guides/$CURRENT_VERSION /**/*.md"
71
- node scripts/update-version-links guides/$CURRENT_VERSION $( echo $CURRENT_VERSION | cut -d " v" -f2) --silent
74
+ node scripts/update-version-links guides/$CURRENT_VERSION $( echo $CURRENT_VERSION | cut -d " v" -f2) $( echo $EMBER_DATA_CURRENT_VERSION | cut -d " v " -f2 ) --silent
72
75
echo " DONE"
73
76
74
77
echo
Original file line number Diff line number Diff line change 26
26
*/
27
27
28
28
const fs = require ( 'fs' ) ;
29
- const replaceURLsVersions = require ( './helpers/replace-url-versions' )
29
+ const replaceURLVersions = require ( './helpers/replace-url-versions' ) ;
30
30
const { Command } = require ( 'commander' ) ;
31
31
const program = new Command ( ) ;
32
32
program . option ( '--dry-run' )
@@ -39,7 +39,8 @@ program.parse(process.argv);
39
39
const options = program . opts ( ) ;
40
40
41
41
const currentFolder = fs . realpathSync ( program . args [ 0 ] ) ;
42
- const newVersionNumber = program . args [ 1 ] ;
42
+ const newEmberVersionNumber = program . args [ 1 ] ;
43
+ const newEmberDataVersionNumber = program . args [ 2 ] ;
43
44
44
45
let dryRun = options . dryRun ;
45
46
let verbose = options . verbose ;
@@ -57,7 +58,11 @@ const recursion = (path) => {
57
58
recursion ( filePath ) ;
58
59
} else if ( fileName . endsWith ( '.md' ) ) {
59
60
const currentOutput = fs . readFileSync ( filePath ) . toString ( ) ;
60
- const newOutput = replaceURLsVersions ( currentOutput , newVersionNumber ) ;
61
+ const newOutput = replaceURLVersions (
62
+ currentOutput ,
63
+ newEmberVersionNumber ,
64
+ newEmberDataVersionNumber
65
+ ) ;
61
66
62
67
if ( currentOutput !== newOutput ) {
63
68
if ( ! dryRun ) {
You can’t perform that action at this time.
0 commit comments