@@ -444,7 +444,7 @@ prepare_build() {
444444 [[ " ${customized_password} " = false ]] && password=" ${defaultpassword} "
445445
446446 # gitversion
447- [[ " ${gitversion} " = true ]] && iso_version=" ${iso_version} -$( cd " ${script_path} " ; git rev-parse --short HEAD ) "
447+ [[ " ${gitversion} " = true ]] && iso_version=" ${iso_version} -${gitrev} "
448448
449449 # Generate iso file name.
450450 local _channel_name=" ${channel_name% .add} -${locale_version} "
@@ -1009,7 +1009,7 @@ make_alteriso_info(){
10091009 local _info_file=" ${isofs_dir} /alteriso-info" _version=" ${iso_version} "
10101010 remove " ${_info_file} " ; touch " ${_info_file} "
10111011 if [[ -d " ${script_path} /.git" ]] && [[ " ${gitversion} " = false ]]; then
1012- _version=" ${iso_version} -$( git rev-parse --short HEAD ) "
1012+ _version=" ${iso_version} -${gitrev} "
10131013 fi
10141014 " ${tools_dir} /alteriso-info.sh" -a " ${arch} " -b " ${boot_splash} " -c " ${channel_name% .add} " -d " ${iso_publisher} " -k " ${kernel} " -o " ${os_name} " -p " ${password} " -u " ${username} " -v " ${_version} " > " ${_info_file} "
10151015 fi
@@ -1293,13 +1293,14 @@ else
12931293 channel_dir=" ${script_path} /channels/${channel_name} "
12941294fi
12951295
1296- # Set dirs
1296+ # Set vars
12971297work_dir=" $( realpath " ${work_dir} " ) "
12981298build_dir=" ${work_dir} /build/${arch} "
12991299cache_dir=" ${work_dir} /cache/${arch} "
13001300airootfs_dir=" ${build_dir} /airootfs"
13011301isofs_dir=" ${build_dir} /iso"
13021302lockfile_dir=" ${build_dir} /lockfile"
1303+ gitrev=" $( cd " ${script_path} " ; git rev-parse --short HEAD) "
13031304
13041305# Create dir
13051306for _dir in " ${build_dir} " " ${cache_dir} " " ${airootfs_dir} " " ${isofs_dir} " " ${lockfile_dir} " ; do
0 commit comments