Skip to content

Commit b416e2b

Browse files
authored
Add back VERSION file to release tarballs (#473)
* Add back `VERSION` file to release tarballs Make sure it makes its way into the sysroot tarball and then copy it from the sysroot location to the top of the sdk tarball as well. Closes #471 * Fix how `VERSION` is installed
1 parent fd24b79 commit b416e2b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ci/merge-artifacts.sh

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ for build in dist-*; do
6060
tar xf $toolchain -C dist/$sdk_dir --strip-components 1
6161
mkdir -p dist/$sdk_dir/share/wasi-sysroot
6262
tar xf $sysroot -C dist/$sdk_dir/share/wasi-sysroot --strip-components 1
63+
mv dist/$sdk_dir/share/wasi-sysroot/VERSION dist/$sdk_dir
6364

6465
# Setup the compiler-rt library for wasi,wasip1,wasip2
6566
rtlibdir=$(dirname $(find dist/$sdk_dir/lib -name include))/lib

cmake/wasi-sdk-sysroot.cmake

+2-4
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,10 @@ execute_process(
329329
COMMAND ${PYTHON} ${version_script} dump
330330
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
331331
OUTPUT_VARIABLE version_dump)
332-
set(version_file_tmp ${CMAKE_CURRENT_BINARY_DIR}/VERSION)
332+
set(version_file_tmp ${wasi_sysroot}/VERSION)
333333
file(GENERATE OUTPUT ${version_file_tmp} CONTENT ${version_dump})
334334
add_custom_target(version-file DEPENDS ${version_file_tmp})
335335
add_dependencies(build version-file)
336-
install(FILES ${version_file_tmp}
337-
DESTINATION ${CMAKE_INSTALL_PREFIX})
338336

339337
if(WASI_SDK_INCLUDE_TESTS)
340338
add_subdirectory(tests)
@@ -353,7 +351,7 @@ add_dependencies(dist-compiler-rt compiler-rt)
353351
# Tarball with the whole sysroot
354352
wasi_sdk_add_tarball(dist-sysroot
355353
${dist_dir}/wasi-sysroot-${wasi_sdk_version}.tar.gz
356-
${wasi_tmp_install}/share/wasi-sysroot)
354+
${wasi_sysroot})
357355
add_dependencies(dist-sysroot build)
358356

359357
add_custom_target(dist DEPENDS dist-compiler-rt dist-sysroot)

0 commit comments

Comments
 (0)