Skip to content

Commit

Permalink
Restructure mister scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzomafizzo committed Jan 21, 2024
1 parent 1342a6f commit 7a646a3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ go.work
/bin
/_bin
/out
scripts/misterbuild/_build
scripts/mister/build/_build
.DS_Store
4 changes: 2 additions & 2 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ var (
binReleasesDir = filepath.Join(binDir, "releases")
upxBin = os.Getenv("UPX_BIN")
// docker mister arm build
misterBuild = filepath.Join(cwd, "scripts", "misterbuild")
misterBuildImageName = "tapto/misterbuild"
misterBuild = filepath.Join(cwd, "scripts", "mister", "build")
misterBuildImageName = "tapto/mister-build"
misterBuildCache = filepath.Join(os.TempDir(), "tapto-mister-buildcache")
misterModCache = filepath.Join(os.TempDir(), "tapto-mister-modcache")
)
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions scripts/generate_repo.py → scripts/mister/repo/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

DB_ID = "mrext/tapto"
DL_URL = "https://github.com/wizzomafizzo/tapto/releases/download/{}"
DL_FOLDER = "_bin/releases"
RELEASES_FOLDER = "_bin/releases"
REPO_FOLDER = "scripts/mister/repo"
FILES = [
"tapto.sh",
"taptui.sh",
Expand Down Expand Up @@ -52,7 +53,7 @@ def create_tapto_db(tag: str) -> RepoDb:

files: RepoDbFiles = {}
for file in FILES:
local_path = os.path.join(DL_FOLDER, file)
local_path = os.path.join(RELEASES_FOLDER, file)

key = "Scripts/{}".format(os.path.basename(local_path))
size = os.stat(local_path).st_size
Expand Down Expand Up @@ -89,7 +90,7 @@ def main():
tag = sys.argv[1]

repo_db = create_tapto_db(tag)
with open("{}/tapto.json".format(DL_FOLDER), "w") as f:
with open("{}/tapto.json".format(REPO_FOLDER), "w") as f:
f.write(generate_json(repo_db))

if __name__ == "__main__":
Expand Down

0 comments on commit 7a646a3

Please sign in to comment.