mirror of
https://github.com/apple/container.git
synced 2026-08-24 10:05:43 -05:00
Update to Swift 6.2 (#195)
This PR updates to Swift 6.2 and resolves a build error after updating to Swift 6.2-snapshot in https://github.com/apple/containerization/pull/94.
This commit is contained in:
@@ -13,18 +13,18 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
SWIFT="/usr/bin/swift"
|
||||
IMAGE_NAME="vminit:latest"
|
||||
DESTDIR="${1:-$(git rev-parse --show-toplevel)/bin}"
|
||||
mkdir -p "${DESTDIR}"
|
||||
|
||||
IMAGE_NAME="vminit:latest"
|
||||
|
||||
CONTAINERIZATION_VERSION="${CONTAINERIZATION_VERSION:-$(swift package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')}"
|
||||
CONTAINERIZATION_VERSION="${CONTAINERIZATION_VERSION:-$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')}"
|
||||
if [ ! -z "${CONTAINERIZATION_PATH}" -o "${CONTAINERIZATION_VERSION}" == "unspecified" ] ; then
|
||||
CONTAINERIZATION_PATH="${CONTAINERIZATION_PATH:-$(swift package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .path')}"
|
||||
CONTAINERIZATION_PATH="${CONTAINERIZATION_PATH:-$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .path')}"
|
||||
echo "Creating InitImage"
|
||||
make -C ${CONTAINERIZATION_PATH} init
|
||||
${CONTAINERIZATION_PATH}/bin/cctl images save -o /tmp/init.tar ${IMAGE_NAME}
|
||||
# sleep because commands after stop and start are racy
|
||||
# Sleep because commands after stop and start are racy.
|
||||
bin/container system stop && sleep 3 && bin/container system start && sleep 3
|
||||
bin/container i load -i /tmp/init.tar
|
||||
rm /tmp/init.tar
|
||||
|
||||
Reference in New Issue
Block a user