@rancher/create-extension 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/update/init +8 -4
- package/update/upgrade +4 -4
package/package.json
CHANGED
package/update/init
CHANGED
|
@@ -12,7 +12,7 @@ const args = process.argv;
|
|
|
12
12
|
|
|
13
13
|
args.splice(0, 2);
|
|
14
14
|
|
|
15
|
-
const res = spawnSync(
|
|
15
|
+
const res = spawnSync(path.join(__dirname, 'upgrade'), args, {
|
|
16
16
|
cwd: dest,
|
|
17
17
|
shell: false,
|
|
18
18
|
stdio: ['ignore', process.stdout, process.stderr],
|
|
@@ -31,9 +31,13 @@ rawdata = fs.readFileSync(path.join(baseFolder, 'app', 'package.json'));
|
|
|
31
31
|
const latestPackage = JSON.parse(rawdata);
|
|
32
32
|
|
|
33
33
|
// Update dependency versions to match the latest from the creator
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
if ( latestPackage.dependencies ) {
|
|
35
|
+
Object.keys(latestPackage.dependencies).forEach((key) => {
|
|
36
|
+
appPackage.dependencies[key] = latestPackage.dependencies[key];
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
console.warn('No dependencies found in latestPackage.'); // eslint-disable-line no-console
|
|
40
|
+
}
|
|
37
41
|
|
|
38
42
|
// Add in the webpack resolution
|
|
39
43
|
appPackage.resolutions = appPackage.resolutions || {};
|
package/update/upgrade
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
2
|
|
|
3
3
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
4
4
|
BASE_DIR="$(cd $SCRIPT_DIR && cd .. && pwd)"
|
|
@@ -20,13 +20,13 @@ done
|
|
|
20
20
|
# Check for a clean git repository
|
|
21
21
|
if [ ! -d ".git" ] && [ "${FORCE}" == "false" ]; then
|
|
22
22
|
echo "Not runnning in a git repository. Re-run with -f to ignore this check"
|
|
23
|
-
echo "Note: This action will update
|
|
23
|
+
echo "Note: This action will update your files - running in a git repository will ensure you have visibility over changes made"
|
|
24
24
|
exit 1
|
|
25
25
|
fi
|
|
26
26
|
|
|
27
27
|
if [[ $(git diff --stat) != '' ]] && [ "${FORCE}" == "false" ]; then
|
|
28
28
|
echo "Git repository is not clean. Re-run with -f to ignore this check"
|
|
29
|
-
echo "Note: This action will update
|
|
29
|
+
echo "Note: This action will update your files - running in a clean git repository will ensure you have visibility over changes made"
|
|
30
30
|
exit 1
|
|
31
31
|
fi
|
|
32
32
|
|
|
@@ -54,4 +54,4 @@ do
|
|
|
54
54
|
|
|
55
55
|
cp ${BASE_DIR}/pkg/files/* ${pkg}
|
|
56
56
|
fi
|
|
57
|
-
done
|
|
57
|
+
done
|