-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ops): consolidate version control
- Loading branch information
Showing
16 changed files
with
113 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package bindgen | ||
|
||
import ( | ||
"encoding/json" | ||
"os" | ||
"path" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestReadExpectedAbigenVersion(t *testing.T) { | ||
// Create a temporary directory for the version control file. | ||
tmpDir := path.Join(os.TempDir(), "version-tests") | ||
defer os.RemoveAll(tmpDir) | ||
require.NoError(t, os.MkdirAll(tmpDir, 0755)) | ||
|
||
// Create a temporary version control file. | ||
versionFile := path.Join(tmpDir, "versions.json") | ||
versions := Versions{Abigen: "v1.2.3"} | ||
|
||
// Marshal the versions to JSON. | ||
versionsJSON, err := json.Marshal(versions) | ||
require.NoError(t, err) | ||
|
||
// Write the JSON to the version control file. | ||
require.NoError(t, os.WriteFile(versionFile, versionsJSON, 0644)) | ||
|
||
// Read the expected version from the version control file. | ||
// The read version should not have a "v" prefix. | ||
expectedVersion, err := readExpectedAbigenVersion(tmpDir) | ||
require.NoError(t, err) | ||
require.Equal(t, expectedVersion, "1.2.3") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
* | ||
!/.foundryrc | ||
!/.abigenrc | ||
!/.gethrc | ||
!/.nvmrc | ||
!/versions.json | ||
!/ops/scripts/install-foundry.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"abigen": "v1.10.25", | ||
"foundry": "71d8ea5923571f33c7aab9ee6e0d1f9a348bd6be", | ||
"geth": "v1.13.4", | ||
"nvm": "v20.9.0", | ||
"slither": "0.10.0", | ||
"kontrol": "0.1.74" | ||
} |