Skip to content

Commit 9f3db56

Browse files
jprinetjthurne
andauthored
Add symbolic link to latest run (#77)
Signed-off-by: Jerome Prinet <jprinet@gradle.com> Co-authored-by: Jim Hurne <hurne_jim@yahoo.com>
1 parent 0997c83 commit 9f3db56

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

components/scripts/lib/init.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ make_experiment_dir() {
44
mkdir -p "${EXP_DIR}"
55
cd "${EXP_DIR}" || die "Unable to access the experiment dir (${EXP_DIR})." 2
66
rm -f "${BUILD_SCAN_FILE}"
7+
8+
make_symlink_to_latest_experiment_dir
9+
}
10+
11+
make_symlink_to_latest_experiment_dir() {
12+
LINK_NAME="$(dirname "${EXP_DIR}")/latest"
13+
readonly LINK_NAME
14+
rm -f "${LINK_NAME}" > /dev/null 2>&1
15+
ln -s "${EXP_DIR}" "${LINK_NAME}" > /dev/null 2>&1
716
}
817

918
generate_run_id() {

release/changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
* FIX: Gradle experiment scripts fail when using the ```--project-dir``` argument to specify the build invocation directory.
2+
* Add a symbolic link to the latest experiment folder to ease folder navigation.

0 commit comments

Comments
 (0)