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

chore: prepare for a first release #13

Merged
merged 3 commits into from
Jan 8, 2024
Merged

chore: prepare for a first release #13

merged 3 commits into from
Jan 8, 2024

Conversation

mariux
Copy link
Contributor

@mariux mariux commented Nov 12, 2023

No description provided.

@mariux mariux marked this pull request as ready for review November 13, 2023 11:54
@mariux mariux requested a review from a team November 13, 2023 11:55
README.md Outdated Show resolved Hide resolved
@zied-elouaer
Copy link

@mariux this seems like a complete rewrite with untested new logic. We spent a lot of time testing the current version and made a lot of fixes and tweaks to make sure it works in all scenarios and fulfills the acceptance criteria.
I suggest at least the following, as a start:

  • Break this PR down into smaller, more readable changes.
  • Write a description for each change explaining why it's necessary. This will require a significant chunk of our time just to test it again so it has to be justified.

Copy link
Contributor

@kkmlr kkmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @zied-elouaer said this is a rewrite and will require testing

README.md Show resolved Hide resolved
examples/basic.yml Outdated Show resolved Hide resolved
install.sh Show resolved Hide resolved
@soerenmartius
Copy link

@mariux pls review

@soerenmartius
Copy link

@mariux this needs to be addressed, having a PR open for ~3 weeks is too long. ty

@mariux mariux force-pushed the mariux/prepare-release branch from 8cf9127 to 292c444 Compare December 6, 2023 14:01
@mariux
Copy link
Contributor Author

mariux commented Dec 6, 2023

Write a description for each change explaining why it's necessary. This will require a significant chunk of our time just to test it again so it has to be justified.

We need to have a maintainable code base. So moving things into functions and adding error checking is the minimum here.

@mariux
Copy link
Contributor Author

mariux commented Dec 6, 2023

require testing

The script has been tested locally in ubuntu.

standard call

$ ./install.sh 
asdf integration: Skipping. No config file found at .tool-versions!
latest version: Getting latest Terramate release information from GitHub Releases
latest version: Using latest version 0.4.3!
install: Downloading Terramate v0.4.3
install: Created tmp directory at /tmp/tmp.2X02J5VkaC
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 16.1M  100 16.1M    0     0  2758k      0  0:00:05  0:00:05 --:--:-- 3793k
install: extracting terramate binary into /tmp/tmp.2X02J5VkaC
install: installing terramate into /usr/local/bin
cp: cannot create regular file '/usr/local/bin/terramate-bin': Permission denied

install into specific directory

$ TMA_INPUT_BINDIR=/dev/shm ./install.sh 
asdf integration: Skipping. No config file found at .tool-versions!
latest version: Getting latest Terramate release information from GitHub Releases
latest version: Using latest version 0.4.3!
install: Downloading Terramate v0.4.3
install: Created tmp directory at /tmp/tmp.OA0qT1dsge
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0
100 16.1M  100 16.1M    0     0   265k      0  0:01:02  0:01:02 --:--:--  585k
install: extracting terramate binary into /tmp/tmp.OA0qT1dsge
install: installing terramate into /dev/shm
install: Version of '/dev/shm/terramate' is '0.4.3'.
install: WARNING: Installation succeeded in /dev/shm/terramate but we are using /home/user/bin/terramate by default!
install: WARNING: terramate at /home/user/bin/terramate is using a different version 0.4.4-dev. Expected version is '0.4.3'!

$ ls -l /dev/shm/terramate
lrwxrwxrwx 1 user user 13 Dez  6 15:15 /dev/shm/terramate -> terramate-bin

install into specific dir

$ TMA_INPUT_USE_WRAPPER=false TMA_INPUT_BINDIR=/dev/shm ./install.sh
asdf integration: Skipping. No config file found at .tool-versions!
latest version: Getting latest Terramate release information from GitHub Releases
latest version: Using latest version 0.4.3!
install: Downloading Terramate v0.4.3
install: Created tmp directory at /tmp/tmp.hltA4gbyq8
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 16.1M  100 16.1M    0     0   322k      0  0:00:51  0:00:51 --:--:--  301k
install: extracting terramate binary into /tmp/tmp.hltA4gbyq8
install: installing terramate into /dev/shm
install: Version of '/dev/shm/terramate' is '0.4.3'.
install: WARNING: Installation succeeded in /dev/shm/terramate but we are using /home/user/bin/terramate by default!
install: WARNING: terramate at /home/user/bin/terramate is using a different version 0.4.4-dev. Expected version is '0.4.3'!

$ ls -l /dev/shm/terramate
lrwxrwxrwx 1 user user 13 Dez  6 15:15 /dev/shm/terramate -> terramate-bin

install into specific dir using wrapper (setup fake GHA env)

$ PATH=/dev/shm:$PATH GITHUB_OUTPUT=/dev/shm/ghoutput.txt GITHUB_ACTION_PATH=$PWD TMA_INPUT_BINDIR=/dev/shm ./install.sh 
asdf integration: Skipping. No config file found at .tool-versions!
latest version: Getting latest Terramate release information from GitHub Releases
latest version: Using latest version 0.4.3!
install: Downloading Terramate v0.4.3
install: Created tmp directory at /tmp/tmp.GCAJuiqZaJ
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 16.1M  100 16.1M    0     0   508k      0  0:00:32  0:00:32 --:--:--  582k
install: extracting terramate binary into /tmp/tmp.GCAJuiqZaJ
install: installing terramate into /dev/shm
install: installing terramate-wrapper into /dev/shm
install: Version of '/dev/shm/terramate' is '0.4.3'.

$ ls -l /dev/shm/terramate
lrwxrwxrwx 1 user user 20 Dez  6 15:23 /dev/shm/terramate -> terramate-wrapper.sh

install old version

$ TMA_INPUT_VERSION=0.4.2 TMA_INPUT_BINDIR=/dev/shm ./install.sh 
input: Using user provided version 0.4.2!
install: Downloading Terramate v0.4.2
install: Created tmp directory at /tmp/tmp.RQBtuNYLjH
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15.8M  100 15.8M    0     0  1742k      0  0:00:09  0:00:09 --:--:-- 1533k
install: extracting terramate binary into /tmp/tmp.RQBtuNYLjH
install: installing terramate into /dev/shm
install: Version of '/dev/shm/terramate' is '0.4.2'.
install: WARNING: Installation succeeded in /dev/shm/terramate but we are using /home/user/bin/terramate by default!
install: WARNING: terramate at /home/user/bin/terramate is using a different version 0.4.4-dev. Expected version is '0.4.2'!

@mariux mariux force-pushed the mariux/prepare-release branch 3 times, most recently from f1144f9 to c38afad Compare December 6, 2023 14:54
@mariux mariux force-pushed the mariux/prepare-release branch 8 times, most recently from 00f2774 to 96d4087 Compare December 6, 2023 15:16
@mariux mariux requested review from kkmlr and a team December 6, 2023 15:17
@mariux
Copy link
Contributor Author

mariux commented Dec 6, 2023

@zied-elouaer added tests

@mariux mariux force-pushed the mariux/prepare-release branch 2 times, most recently from 030cfa7 to 32ac2a3 Compare December 6, 2023 15:36
@mariux mariux force-pushed the mariux/prepare-release branch from 32ac2a3 to c2d0d42 Compare December 6, 2023 15:42
@mariux mariux merged commit d226053 into main Jan 8, 2024
8 checks passed
@mariux mariux deleted the mariux/prepare-release branch January 8, 2024 10:22
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.

4 participants