Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

[SYM-4980] Enable make local in terraform-provider-sym to work on M1 laptops #162

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

Anupya
Copy link
Contributor

@Anupya Anupya commented Aug 21, 2023

Description

Change OS_ARCH to darwin_arm64 for M1 laptops.

Note

We could also add a m1local command and solve this problem like so:

m1local: build
ifeq ($(shell uname -m), arm64)
	OS_ARCH=darwin_arm64
endif
	PLUGIN_DIR=~/.terraform.d/plugins/terraform.${HOSTNAME}/symopsio/${NAME}/${VERSION}/${OS_ARCH}
	mkdir -p ${PLUGIN_DIR}
	cp dist/${BINARY} ${PLUGIN_DIR}/${BINARY}_v${VERSION}

I chose to do it this way just for personal preference (I might forget to run make m1local instead of make local). It also prevents us from updating our internal docs to tell M1 laptop users to use m1local.

@linear
Copy link

linear bot commented Aug 21, 2023

SYM-4980 Enable `make local` in `terraform-provider-sym` to work on M1 laptops

Use this https://stackoverflow.com/questions/65259300/detect-apple-silicon-from-command-line and modify OS_ARCH value in Makefile.

OR

we create make m1local and change the OS_ARCH value that way.

@Anupya
Copy link
Contributor Author

Anupya commented Aug 21, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@Anupya Anupya marked this pull request as ready for review August 21, 2023 14:22
@Anupya Anupya requested a review from a team August 21, 2023 14:22
@Anupya Anupya merged commit 59e42e6 into main Aug 21, 2023
@Anupya Anupya deleted the Anupya/modify_osarch_for_m1_laptops branch August 21, 2023 14:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants