Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X compatibility #1

Open
mattandrews opened this issue Oct 19, 2015 · 5 comments
Open

OS X compatibility #1

mattandrews opened this issue Oct 19, 2015 · 5 comments

Comments

@mattandrews
Copy link

Hi – thanks for your great script.

I've been using this on my Mac and ran into a few issues:

  • readlink -f fails with an error (the -f flag doesn't exist) – I got around this by running brew install coreutils and changing readlink to greadlink.
  • sed -r fails for presumably similar reasons. Again, brew install gnu-sed then replacing it with gsed -r worked.
  • my AWS account credentials live in ~/.aws/credentials (which I think the AWS CLI docs recommend) but this script errors when looking for them in ~/.aws/config, so I changed those paths
  • my first successful run of the script uploaded a file called .zip because I forgot to set AWS_CODE_DEPLOY_S3_FILENAME – the other "required" variables cause the script to throw an error if they're not set, so maybe this one should too?

Hope this helps! Probably not worth me patching anything as these changes will likely break the app for non-OSX *nixes, but maybe worth noting somewhere in the readme?

@mattandrews
Copy link
Author

Oh! And: step 8 (removing old deploys) fails for me, again on OS X. I just get:

➜ aws s3 rm "s3://my-bucket-name/test/"
✖ A client error (404) occurred when calling the HeadObject operation: Key "test/" does not exist
Completed 1 part(s) with ... file(s) remaining```

(eg. the regex doesn't bring back the filename of my deploy)

@virgofx
Copy link
Member

virgofx commented Nov 30, 2015

@mattandrews Thanks for the awesome feedback! I've been super busy the past month but will setup a Mac OS X installation to hopefully test this. I primarily test on Windows and Linux (Vagrant) but the goal would be to make this cross OS compatible. I do want to also make this as stable as possible as I notice that the integrated code deploy solutions within Codeship or Codedeploy often break as the AWS and AWS CLI continously upgrade at a faster pace ... So I want to keep this one more inline with current revisions and able to integrate seamlessly with hosted CI.

@virgofx
Copy link
Member

virgofx commented Jul 16, 2017

@mattandrews Better late then never ... just got around to looking at this. I had some time to add a couple new features (pre-packaged bundle deploy) and made sure points 3 and 4 are fixed. Looking into the top ones but I need to spin up a mac-OS system so I can test. Will get around to these eventually .. if you do have a patch that works cross platform feel free to send that over in a PR.

@Jaikant
Copy link

Jaikant commented Feb 22, 2018

Great script!
I am on a mac and it still errors as below, nevertheless I am going to try it on circleci now :)

Step 6: Checking Application Source
readlink: illegal option -- f
usage: readlink [-n] [file ...]
✖ The specified application source "build/" does not exist.

@gregorskii
Copy link

+1 to this, I modified the script in my local npm repo to avoid this.

For the rest you can brew install greadlink via:

brew install coreutils

Then you can update the file ~line 322:

APP_SOURCE=$(greadlink -f "${AWS_CODE_DEPLOY_APP_SOURCE:-.}")

I did it in my nvm path for the install EX:

/Users/<USER>/.nvm/versions/node/v10.16.0/bin/aws-code-deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants