Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Ğ
Ğcli-v2s
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
Rust
Ğcli-v2s
Commits
8820e6de
Commit
8820e6de
authored
10 months ago
by
poka
Browse files
Options
Downloads
Patches
Plain Diff
add script to install macos bin
parent
439c267c
No related branches found
No related tags found
No related merge requests found
Pipeline
#37131
passed
10 months ago
Stage: build_linux
Stage: build_macos
Stage: release
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+7
-3
7 additions, 3 deletions
.gitlab-ci.yml
Dockerfile.ci
+4
-0
4 additions, 0 deletions
Dockerfile.ci
scripts/Info.plist
+62
-0
62 additions, 0 deletions
scripts/Info.plist
scripts/install_gcli.scpt
+18
-0
18 additions, 0 deletions
scripts/install_gcli.scpt
with
91 additions
and
3 deletions
.gitlab-ci.yml
+
7
−
3
View file @
8820e6de
...
...
@@ -31,7 +31,7 @@ build_linux:
build_macos
:
stage
:
build_macos
image
:
poka/rust-osxcross:
1.0.2
image
:
poka/rust-osxcross:
latest
script
:
# Install the required dependencies
-
rustup target add x86_64-apple-darwin
...
...
@@ -41,9 +41,13 @@ build_macos:
-
rm -rf target/macos
-
mkdir -p target/macos
-
cargo bundle --release --target x86_64-apple-darwin
#
Zip the gcli.app before moving i
t
#
Add Info.plist and install_gcli.scp
t
-
cd target/x86_64-apple-darwin/release/bundle/osx
-
echo -e "Unzip gcli.zip and move the gcli.app folder to /Applications/ folder.\nenjoy" > instructions.txt
-
mkdir -p gcli.app/Contents/Resources/Scripts
-
cp /opt/Info.plist gcli.app/Contents/Info.plist
-
cp /opt/install_gcli.scpt gcli.app/Contents/Resources/Scripts/install_gcli.scpt
-
echo -e "Just unzip gcli.app and open it.\nenjoy" > instructions.txt
# Zip the gcli.app before moving it
-
zip -r gcli.zip gcli.app instructions.txt
-
mv gcli.zip ../../../../macos/
# target/macos/
artifacts
:
...
...
This diff is collapsed.
Click to expand it.
Dockerfile.ci
+
4
−
0
View file @
8820e6de
...
...
@@ -44,5 +44,9 @@ ENV CXX="o64-clang++"
# Add rust target for macOS
RUN rustup target add x86_64-apple-darwin
# Copy scripts
COPY scripts/install_gcli.scpt /opt/install_gcli.scpt
COPY scripts/Info.plist /opt/Info.plist
# Define the entrypoint
CMD ["bash"]
This diff is collapsed.
Click to expand it.
scripts/Info.plist
0 → 100644
+
62
−
0
View file @
8820e6de
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
CFBundleDevelopmentRegion
</key>
<string>
English
</string>
<key>
CFBundleDisplayName
</key>
<string>
gcli
</string>
<key>
CFBundleExecutable
</key>
<string>
osascript
</string>
<key>
CFBundleIdentifier
</key>
<string>
com.axiomteam.gcli
</string>
<key>
CFBundleInfoDictionaryVersion
</key>
<string>
6.0
</string>
<key>
CFBundleName
</key>
<string>
gcli
</string>
<key>
CFBundlePackageType
</key>
<string>
APPL
</string>
<key>
CFBundleShortVersionString
</key>
<string>
0.2.13
</string>
<key>
CFBundleVersion
</key>
<string>
20240522.234244
</string>
<key>
CSResourcesFileMapped
</key>
<true/>
<key>
LSRequiresCarbon
</key>
<true/>
<key>
NSHighResolutionCapable
</key>
<true/>
<key>
NSAppleScriptEnabled
</key>
<true/>
<key>
CFBundleURLTypes
</key>
<array>
<dict>
<key>
CFBundleURLName
</key>
<string>
gcli script
</string>
<key>
CFBundleURLSchemes
</key>
<array>
<string>
file
</string>
</array>
</dict>
</array>
<key>
CFBundleDocumentTypes
</key>
<array>
<dict>
<key>
CFBundleTypeExtensions
</key>
<array>
<string>
scpt
</string>
</array>
<key>
CFBundleTypeIconFile
</key>
<string>
ScriptEditorAppIcon.icns
</string>
<key>
CFBundleTypeName
</key>
<string>
AppleScript
</string>
<key>
CFBundleTypeRole
</key>
<string>
Editor
</string>
</dict>
</array>
<key>
CFBundleExecutable
</key>
<string>
osascript
</string>
<key>
CFBundleScriptPath
</key>
<string>
Contents/Resources/Scripts/install_gcli.scpt
</string>
</dict>
</plist>
This diff is collapsed.
Click to expand it.
scripts/install_gcli.scpt
0 → 100644
+
18
−
0
View file @
8820e6de
-- Ask user if they want to install gcli
set
userResponse
to
display dialog
"Do you want to install gcli to /usr/local/bin?"
buttons
{
"No"
,
"Yes"
}
default
button
"Yes"
if
button returned
of
userResponse
is
"Yes"
then
-- Run shell script to move gcli with administrator privileges
try
do shell script
"mv gcli.app/Contents/MacOS/gcli /usr/local/bin"
with
administrator
privileges
display dialog
"gcli has been installed to /usr/local/bin and is now available in your PATH."
on
error
errMsg
number
errorNumber
if
errorNumber
is
-
128
then
display dialog
"Installation cancelled."
else
display dialog
"An error occurred: "
&
errMsg
end
if
end
try
else
display dialog
"Installation cancelled."
end
if
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment