File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ NEXT_VERSION=$MAJOR_VERSION.$(($MINOR_VERSION+1)).$PATCH_VERSION
48
48
49
49
# Copy the current release guides into the appropriate version-numbered folder.
50
50
# `-r` is for recursive, so all directory content is copied.
51
+ echo " 🤖 Removing any directories for $CURRENT_VERSION "
52
+ rm -rf guides/$CURRENT_VERSION
51
53
echo " 🤖 Copying release to $CURRENT_VERSION "
52
54
cp -r guides/release guides/$CURRENT_VERSION
53
55
echo " DONE"
@@ -66,9 +68,12 @@ sed -i .bak -e "/currentVersion/i \\
66
68
rm guides/versions.yml.bak
67
69
echo " DONE"
68
70
71
+ 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."
72
+ read -r EMBER_DATA_CURRENT_VERSION
73
+
69
74
# Update version numbers in links
70
75
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
76
+ 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
77
echo " DONE"
73
78
74
79
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