Skip to content

Commit

Permalink
Update dl compiler script.
Browse files Browse the repository at this point in the history
  • Loading branch information
msinkec committed Oct 16, 2023
1 parent d7bd93a commit 1132d53
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 44 deletions.
21 changes: 13 additions & 8 deletions downloadcompiler.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
COMPILER_VERSION=1.19.0
COMPILER_VERSION=1.19.1
GITHUB_OWNER=sCrypt-Inc
GITHUB_REPO=compiler_dist
GITHUB_TAG="v$COMPILER_VERSION"
GITHUB_ASSET_FILENAME_WINDOWS="./scryptc/win32/scryptc.exe"
GITHUB_ASSET_FILENAME_LINUX="./scryptc/linux/scryptc"
GITHUB_ASSET_FILENAME_LINUX_ARM="./scryptc/linux-aarch64/scryptc"
GITHUB_ASSET_FILENAME_MACOS="./scryptc/mac/scryptc"
echo "$GITHUB_OWNER"
echo "$GITHUB_REPO"
Expand All @@ -13,34 +14,38 @@ rm -rf "./scryptc"

mkdir -p "./scryptc/win32/"
mkdir -p "./scryptc/linux/"
mkdir -p "./scryptc/linux-aarch64/"
mkdir -p "./scryptc/mac/"

#we just update tag.json locally when you change COMPILER_VERSION, because github api has daily limit.
#curl -sSL -J "https://api.github.com/repos/${GITHUB_OWNER}/${GITHUB_REPO}/releases/tags/${GITHUB_TAG}" > tag.json

GITHUB_LINUX_ASSET_URL=$(node parser.js Linux)
GITHUB_MACOS_ASSET_URL=$(node parser.js macOS)
GITHUB_WINDOWS_ASSET_URL=$(node parser.js Windows)



GITHUB_LINUX_ASSET_URL=$(node parser.js Linux-x86_64)
GITHUB_LINUX_ARM_ASSET_URL=$(node parser.js Linux-aarch64)
GITHUB_MACOS_ASSET_URL=$(node parser.js macOS-x86_64)
GITHUB_WINDOWS_ASSET_URL=$(node parser.js Windows-AMD64)


echo "$GITHUB_MACOS_ASSET_URL"
echo "$GITHUB_WINDOWS_ASSET_URL"
echo "$GITHUB_LINUX_ASSET_URL"
echo "$GITHUB_LINUX_ARM_ASSET_URL"

if [ $GITHUB_MACOS_ASSET_URL != "no_assets" ]; then
curl -L -J ${GITHUB_MACOS_ASSET_URL} -o ${GITHUB_ASSET_FILENAME_MACOS} -H 'Accept: application/octet-stream'
chmod u+x "$GITHUB_ASSET_FILENAME_MACOS"

fi

if [ $GITHUB_LINUX_ASSET_URL != "no_assets" ]; then
curl -L -J ${GITHUB_LINUX_ASSET_URL} -o ${GITHUB_ASSET_FILENAME_LINUX} -H 'Accept: application/octet-stream'
chmod u+x "$GITHUB_ASSET_FILENAME_LINUX"
fi

if [ $GITHUB_LINUX_ARM_ASSET_URL != "no_assets" ]; then
curl -L -J ${GITHUB_LINUX_ARM_ASSET_URL} -o ${GITHUB_ASSET_FILENAME_LINUX_ARM} -H 'Accept: application/octet-stream'
chmod u+x "$GITHUB_ASSET_FILENAME_LINUX_ARM"
fi

if [ $GITHUB_WINDOWS_ASSET_URL != "no_assets" ]; then
curl -L -J ${GITHUB_WINDOWS_ASSET_URL} -o ${GITHUB_ASSET_FILENAME_WINDOWS} -H 'Accept: application/octet-stream'
fi
106 changes: 70 additions & 36 deletions tag.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/81632068",
"assets_url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/81632068/assets",
"upload_url": "https://uploads.github.com/repos/sCrypt-Inc/compiler_dist/releases/81632068/assets{?name,label}",
"html_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/tag/v1.19.0",
"id": 81632068,
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/125140960",
"assets_url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/125140960/assets",
"upload_url": "https://uploads.github.com/repos/sCrypt-Inc/compiler_dist/releases/125140960/assets{?name,label}",
"html_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/tag/v1.19.1",
"id": 125140960,
"author": {
"login": "scrypt-sv",
"id": 52027588,
Expand All @@ -24,20 +24,20 @@
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOEskUbM4E3ZtE",
"tag_name": "v1.19.0",
"node_id": "RE_kwDOEskUbM4HdX_g",
"tag_name": "v1.19.1",
"target_commitish": "master",
"name": "refs/tags/v1.19.0",
"name": "refs/tags/v1.19.1",
"draft": false,
"prerelease": false,
"created_at": "2022-10-26T11:57:27Z",
"published_at": "2022-11-01T08:18:33Z",
"created_at": "2022-11-01T09:44:49Z",
"published_at": "2023-10-15T20:44:20Z",
"assets": [
{
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/83011139",
"id": 83011139,
"node_id": "RA_kwDOEskUbM4E8qZD",
"name": "scryptc-1.19.0-Linux",
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/130747220",
"id": 130747220,
"node_id": "RA_kwDOEskUbM4HywtU",
"name": "scrypt-1.19.1-Linux-aarch64",
"label": "",
"uploader": {
"login": "scrypt-sv",
Expand All @@ -61,17 +61,17 @@
},
"content_type": "binary/octet-stream",
"state": "uploaded",
"size": 12408752,
"size": 17801560,
"download_count": 1,
"created_at": "2022-11-01T08:18:33Z",
"updated_at": "2022-11-01T08:18:34Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.0/scryptc-1.19.0-Linux"
"created_at": "2023-10-15T20:59:11Z",
"updated_at": "2023-10-15T20:59:13Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.1/scrypt-1.19.1-Linux-aarch64"
},
{
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/83011904",
"id": 83011904,
"node_id": "RA_kwDOEskUbM4E8qlA",
"name": "scryptc-1.19.0-macOS",
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/130745812",
"id": 130745812,
"node_id": "RA_kwDOEskUbM4HywXU",
"name": "scrypt-1.19.1-Linux-x86_64",
"label": "",
"uploader": {
"login": "scrypt-sv",
Expand All @@ -95,17 +95,17 @@
},
"content_type": "binary/octet-stream",
"state": "uploaded",
"size": 5457368,
"size": 13048224,
"download_count": 0,
"created_at": "2022-11-01T08:30:49Z",
"updated_at": "2022-11-01T08:30:50Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.0/scryptc-1.19.0-macOS"
"created_at": "2023-10-15T20:44:21Z",
"updated_at": "2023-10-15T20:44:22Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.1/scrypt-1.19.1-Linux-x86_64"
},
{
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/83011826",
"id": 83011826,
"node_id": "RA_kwDOEskUbM4E8qjy",
"name": "scryptc-1.19.0-Windows.exe",
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/130746783",
"id": 130746783,
"node_id": "RA_kwDOEskUbM4Hywmf",
"name": "scrypt-1.19.1-macOS-x86_64",
"label": "",
"uploader": {
"login": "scrypt-sv",
Expand All @@ -129,14 +129,48 @@
},
"content_type": "binary/octet-stream",
"state": "uploaded",
"size": 13232128,
"size": 5539504,
"download_count": 0,
"created_at": "2022-11-01T08:29:54Z",
"updated_at": "2022-11-01T08:29:55Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.0/scryptc-1.19.0-Windows.exe"
"created_at": "2023-10-15T20:53:53Z",
"updated_at": "2023-10-15T20:53:54Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.1/scrypt-1.19.1-macOS-x86_64"
},
{
"url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/releases/assets/130746634",
"id": 130746634,
"node_id": "RA_kwDOEskUbM4HywkK",
"name": "scrypt-1.19.1-Windows-AMD64.exe",
"label": "",
"uploader": {
"login": "scrypt-sv",
"id": 52027588,
"node_id": "MDQ6VXNlcjUyMDI3NTg4",
"avatar_url": "https://avatars.githubusercontent.com/u/52027588?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/scrypt-sv",
"html_url": "https://github.com/scrypt-sv",
"followers_url": "https://api.github.com/users/scrypt-sv/followers",
"following_url": "https://api.github.com/users/scrypt-sv/following{/other_user}",
"gists_url": "https://api.github.com/users/scrypt-sv/gists{/gist_id}",
"starred_url": "https://api.github.com/users/scrypt-sv/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/scrypt-sv/subscriptions",
"organizations_url": "https://api.github.com/users/scrypt-sv/orgs",
"repos_url": "https://api.github.com/users/scrypt-sv/repos",
"events_url": "https://api.github.com/users/scrypt-sv/events{/privacy}",
"received_events_url": "https://api.github.com/users/scrypt-sv/received_events",
"type": "User",
"site_admin": false
},
"content_type": "binary/octet-stream",
"state": "uploaded",
"size": 13845504,
"download_count": 0,
"created_at": "2023-10-15T20:52:47Z",
"updated_at": "2023-10-15T20:52:48Z",
"browser_download_url": "https://github.com/sCrypt-Inc/compiler_dist/releases/download/v1.19.1/scrypt-1.19.1-Windows-AMD64.exe"
}
],
"tarball_url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/tarball/v1.19.0",
"zipball_url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/zipball/v1.19.0",
"tarball_url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/tarball/v1.19.1",
"zipball_url": "https://api.github.com/repos/sCrypt-Inc/compiler_dist/zipball/v1.19.1",
"body": "Compiler binaries"
}

0 comments on commit 1132d53

Please sign in to comment.