Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
A compter du 1er avril, attention à vos pipelines :
Nouvelles limitations de Docker Hub
Show more breadcrumbs
Cassiopée
nghyd
Commits
16d698a4
Commit
16d698a4
authored
2 years ago
by
François Grand
Browse files
Options
Downloads
Patches
Plain Diff
fix: (too) early modification of application version in Angular service worker configuration file
refs
#588
parent
ddf7ec00
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
scripts/deploy-new-stable-version.sh
+16
-8
16 additions, 8 deletions
scripts/deploy-new-stable-version.sh
with
16 additions
and
8 deletions
scripts/deploy-new-stable-version.sh
+
16
−
8
View file @
16d698a4
...
...
@@ -19,6 +19,9 @@ then
exit
1
fi
# Angular service worker configuration file
NGSW_CONF
=
ngsw-config.json
# 0. changelog
read
-p
"Avez-vous rempli jalhyd_branch, et les CHANGELOG de JaLHyd et NgHyd pour la version
$VERSION
? (o/N) "
-n
1
-r
echo
...
...
@@ -28,8 +31,8 @@ then
exit
2
fi
if
[[
!
-f
ngsw-config.json
]]
;
then
echo
"Fichier de configuration du service worker
ngsw-config.json
non trouvé"
>
&2
if
[[
!
-f
$NGSW_CONF
]]
;
then
echo
"Fichier de configuration du service worker
$NGSW_CONF
non trouvé"
>
&2
exit
1
fi
...
...
@@ -73,11 +76,7 @@ git push --tags --force
echo
"BUILDING NGHYD"
cd
..
# 2.1 service worker configuration (application version)
sed
-i
"/
\"
version
\"
:
\"
/s/
\"
:
\"
.*/
\"
:
\"
$VERSION
\"
/"
ngsw-config.json
# 2.2 update Git repository
# 2.1 update Git repository
git checkout master
git pull
--rebase
npm
install
...
...
@@ -87,7 +86,7 @@ then
git commit
-a
-m
"verify dependencies (npm install) before deploying version
$VERSION
"
fi
# 2.
3
version in package.*
# 2.
2
version in package.*
npm version
"
$VERSION
"
--allow-same-version
--git-tag-version
=
false
if
[
!
-z
"
$(
git status
--untracked-files
=
no
--porcelain
)
"
]
then
...
...
@@ -95,6 +94,15 @@ then
git commit
-a
-m
"update package.* to version
$VERSION
"
fi
# 2.3 service worker configuration (application version)
echo
"updating version in Angular service worker configuration"
>
&2
sed
-i
"/
\"
version
\"
:
\"
/s/
\"
:
\"
.*/
\"
:
\"
$VERSION
\"
/"
$NGSW_CONF
# check
if
[[
-z
$(
grep
version
$NGSW_CONF
|
grep
$VERSION
)
]]
;
then
echo
"error updating version in service worker configuration file
$NGSW_CONF
"
>
&2
exit
1
fi
# 2.4 tags
echo
"setting tags to
$VERSION
version"
git tag
-fa
stable
-m
"stable version"
...
...
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