Skip to content

Conversation

@jcbhmr
Copy link
Member

@jcbhmr jcbhmr commented Aug 31, 2023

this pr actually kinda tackles many things at once:

  1. if version is latest, replace it with latest version from https://github.com/tinygo-org/tinygo/releases
  2. use more "official-y" funcs (check_packages and rm -rf /var/lib/apt/lists/*)
  3. use dpkg --print-architecture which would appear(?) to print "amd64" on my x64 machine so i think just arch=$(dpkg --print-architecture) is ok? idk tho. I've been wrong before 😅
  4. rm -rf /var/lib/apt/lists/* at the end

😬 idk if you want me to split this into multiple prs to selectively merge? 👆 - they just kinda happened as i replaced code 🤣

this pr would:

@lee-orr this is your feature so idk if you want to change any of this at all. it works fine as-is. this is just some ideas that i had 😊.

@jcbhmr jcbhmr requested a review from lee-orr August 31, 2023 20:17
@jcbhmr
Copy link
Member Author

jcbhmr commented Aug 31, 2023

good news: the url properly redirects and gets printed!

jcbhmr@PIG-2016:~/Documents/23$ curl -fsSL https://github.com/tinygo-org/tinygo/releases/latest -w '%{url_effective}' -o /dev/null
https://github.com/tinygo-org/tinygo/releases/tag/v0.29.0

bad news: the sed magic to extract that last v0.29.0 part fails 😭😭

time to fix! 🔧

@jcbhmr jcbhmr marked this pull request as draft August 31, 2023 20:26
@jcbhmr
Copy link
Member Author

jcbhmr commented Aug 31, 2023

back to green!

jcbhmr@PIG-2016:~/Documents/23$ curl -fsSL https://github.com/tinygo-org/tinygo/releases/latest -w '%{url_effective}' -o /dev/null | grep -oP '\d+\.\d+\.\d+$'
0.29.0

@jcbhmr jcbhmr marked this pull request as ready for review August 31, 2023 20:31
@lee-orr
Copy link
Contributor

lee-orr commented Aug 31, 2023

This all looks great to me!

@jcbhmr jcbhmr merged commit 79f4298 into main Sep 5, 2023
@jcbhmr jcbhmr deleted the default-latest branch September 5, 2023 15:59
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

Successfully merging this pull request may close these issues.

2 participants