Skip to content

Commit

Permalink
Remove submodule for genesis-snapshot to enable import by other projects
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Feb 15, 2024
1 parent 3f5b497 commit 5769cdd
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 228 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:

- name: Build genesis-snapshot tool
working-directory: tools/genesis-snapshot
run: go mod tidy && go build .
run: go build .
2 changes: 1 addition & 1 deletion .github/workflows/feature-network-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: 'tools/genesis-snapshot/go.mod'
go-version-file: 'go.mod'
cache: false

- name: Print Go version
Expand Down
4 changes: 0 additions & 4 deletions scripts/go_mod_tidy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ pushd tools/gendoc
go mod tidy
popd

pushd tools/genesis-snapshot
go mod tidy
popd

popd
69 changes: 0 additions & 69 deletions tools/genesis-snapshot/go.mod

This file was deleted.

145 changes: 0 additions & 145 deletions tools/genesis-snapshot/go.sum

This file was deleted.

10 changes: 2 additions & 8 deletions tools/genesis-snapshot/presets/presets_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package presets

import (
"fmt"
"os"

"golang.org/x/crypto/blake2b"
"gopkg.in/yaml.v3"

"github.com/iotaledger/hive.go/crypto/ed25519"
"github.com/iotaledger/hive.go/lo"
"github.com/iotaledger/hive.go/runtime/ioutils"
"github.com/iotaledger/hive.go/runtime/options"
"github.com/iotaledger/iota-core/pkg/testsuite/mock"
"github.com/iotaledger/iota-core/pkg/testsuite/snapshotcreator"
Expand Down Expand Up @@ -42,13 +41,8 @@ type ConfigYaml struct {
}

func GenerateFromYaml(hostsFile string) ([]options.Option[snapshotcreator.Options], error) {
yamlFile, err := os.ReadFile(hostsFile)
if err != nil {
return nil, err
}
var configYaml ConfigYaml
err = yaml.Unmarshal(yamlFile, &configYaml)
if err != nil {
if err := ioutils.ReadYAMLFromFile(hostsFile, &configYaml); err != nil {
return nil, err
}

Expand Down

0 comments on commit 5769cdd

Please sign in to comment.