Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Version
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Utilities
Version
Commits
9aeb0c55
Verified
Commit
9aeb0c55
authored
1 year ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
fix: test gorelease
parent
dcd7d37e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devenv.nix
+60
-55
60 additions, 55 deletions
devenv.nix
with
60 additions
and
55 deletions
devenv.nix
+
60
−
55
View file @
9aeb0c55
...
...
@@ -226,21 +226,20 @@ builds:
scripts
.
tag-version
.
exec
=
''
!#
${
pkgs
.
bash
}
/bin/bash
${
pkgs
.
git
}
/bin/git config user.email "
''$
{GITLAB_USER_EMAIL}"
;\
${
pkgs
.
git
}
/bin/git config user.name "
''$
{GITLAB_USER_NAME:-"Gitlab CI"}"
;\
${
pkgs
.
git
}
/bin/git config credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=
''$
{CI_JOB_TOKEN}"; }; f'
;\
${
pkgs
.
git
}
/bin/git config pull.rebase true
;\
${
pkgs
.
git
}
/bin/git config http.sslVerify "false"
;\
${
pkgs
.
git
}
/bin/git remote set-url origin https://pad:
''$
{GITLAB_TOKEN}@
''$
{CI_REPOSITORY_URL#*@}
;\
${
pkgs
.
git
}
/bin/git fetch --all --tags --unshallow
;\
${
pkgs
.
git
}
/bin/git reset --hard origin/master
;\
${
pkgs
.
git
}
/bin/git checkout $CI_COMMIT_REF_NAME
;\
${
pkgs
.
git
}
/bin/git pull origin $CI_COMMIT_REF_NAME
;\
${
inputs
.
version
.
defaultPackage
.
"
${
builtins
.
currentSystem
}
"
}
/bin/version auto --git --verbose
;\
set -x
${
pkgs
.
git
}
/bin/git config user.email "
''$
{GITLAB_USER_EMAIL}"
${
pkgs
.
git
}
/bin/git config user.name "
''$
{GITLAB_USER_NAME:-"Gitlab CI"}"
${
pkgs
.
git
}
/bin/git config credential.helper '!f() { echo "username=gitlab-ci-token"; echo "password=
''$
{CI_JOB_TOKEN}"; }; f'
${
pkgs
.
git
}
/bin/git config pull.rebase true
${
pkgs
.
git
}
/bin/git config http.sslVerify "false"
${
pkgs
.
git
}
/bin/git remote set-url origin https://pad:
''$
{GITLAB_TOKEN}@
''$
{CI_REPOSITORY_URL#*@}
${
pkgs
.
git
}
/bin/git fetch --all --tags --unshallow
${
pkgs
.
git
}
/bin/git reset --hard origin/master
${
pkgs
.
git
}
/bin/git checkout $CI_COMMIT_REF_NAME
${
pkgs
.
git
}
/bin/git pull origin $CI_COMMIT_REF_NAME
${
inputs
.
version
.
defaultPackage
.
"
${
builtins
.
currentSystem
}
"
}
/bin/version auto --git --verbose
${
pkgs
.
git
}
/bin/git push origin $CI_COMMIT_REF_NAME
''
;
scripts
.
update-files
.
exec
=
''
!#
${
pkgs
.
bash
}
/bin/bash
...
...
@@ -269,7 +268,6 @@ builds:
cat
${
gitlabCiYaml
}
> "
${
config
.
devenv
.
root
}
/.gitlab-ci.yml"
''
;
...
...
@@ -281,50 +279,57 @@ builds:
difftastic
.
enable
=
true
;
# This script is executed when the app is built
# You can use it to build the app
scripts
.
build-app
.
exec
=
''
#!
${
pkgs
.
bash
}
/bin/bash
set -x
PATH="
''$
{PATH}":
${
pkgs
.
coreutils
}
/bin
PATH="
''$
{PATH}":
${
pkgs
.
findutils
}
/bin
PATH="
''$
{PATH}":
${
pkgs
.
jq
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
rsync
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
bash
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
curl
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
moreutils
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
gnutar
}
/bin
PATH="
''$
{PATH}":
${
pkgs
.
gzip
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
procps
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
eza
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
git
}
/bin/
PATH="
''$
{PATH}":
${
pkgs
.
gnugrep
}
/bin/
PATH="
''$
{PATH}":
${
inputs
.
version
.
defaultPackage
.
"
${
builtins
.
currentSystem
}
"
}
/bin/
export PATH
if [ -z "'CI_JOB_TOKEN" ]; then
version=
''$
(git describe --tags --always --dirty)
buildDate=
''$
(date -u +"%Y-%m-%dT%H:%M:%SZ")
else
version=
''$
(version predict --git)
buildDate=
''$
(version date)
fi
${
config
.
devenv
.
root
}
/bin/go-compile.sh \
"
${
config
.
devenv
.
root
}
/source/" \
"
${
config
.
devenv
.
root
}
/dist"/ \
"version" \
"main" \
"
''$
{version}" \
"
''$
{buildDate}"
''
;
${
pkgs
.
nix
}
/bin/nix build .#version
''
;
# # This script is executed when the app is built
# # You can use it to build the app
# scripts.build-app.exec = ''
##!${pkgs.bash}/bin/bash
#
#set -x
#
#PATH="''${PATH}":${pkgs.coreutils}/bin
#PATH="''${PATH}":${pkgs.findutils}/bin
#PATH="''${PATH}":${pkgs.jq}/bin/
#PATH="''${PATH}":${pkgs.rsync}/bin/
#PATH="''${PATH}":${pkgs.bash}/bin/
#PATH="''${PATH}":${pkgs.curl}/bin/
#PATH="''${PATH}":${pkgs.moreutils}/bin/
#PATH="''${PATH}":${pkgs.gnutar}/bin
#PATH="''${PATH}":${pkgs.gzip}/bin/
#PATH="''${PATH}":${pkgs.procps}/bin/
#PATH="''${PATH}":${pkgs.eza}/bin/
#PATH="''${PATH}":${pkgs.git}/bin/
#PATH="''${PATH}":${pkgs.gnugrep}/bin/
#PATH="''${PATH}":${inputs.version.defaultPackage."${builtins.currentSystem}"}/bin/
#
#export PATH
#
#
#if [ -z "'CI_JOB_TOKEN" ]; then
# version=''$(git describe --tags --always --dirty)
# buildDate=''$(date -u +"%Y-%m-%dT%H:%M:%SZ")
#else
# version=''$(version predict --git)
# buildDate=''$(version date)
#fi
#
#${config.devenv.root}/bin/go-compile.sh \
# "${config.devenv.root}/source/" \
# "${config.devenv.root}/dist"/ \
# "version" \
# "main" \
# "''${version}" \
# "''${buildDate}"
#
#
#'';
# This scritp is used to deploy the app to the gitlab registry
# It is used by the gitlab-ci.yml file
...
...
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